[dawn][native] Trim mappedData in DynamicUploader large reservation path In commit c3845d0d9626, UploadReservation was spanified, but the large allocation path (>4MiB) in DynamicUploader::Reserve left mappedData set to the full staging buffer range of size Align(allocationSize, 8). When allocationSize is not a multiple of 8, Span::CopyFrom triggers an assertion failure in BufferBase::UploadData (DAWN_CHECK(other.size() == size())), causing the process to abort on writeBuffer calls >4MiB whose size is not a multiple of 8. Fix this by trimming mappedData with .first(allocationSize), matching the ring buffer path. Fixed: 556738097 Bug: 534203108 Change-Id: I52caec20e3dfac18723db126880f84cf0e731aac Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/339375 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Dawn is an open-source and cross-platform implementation of the WebGPU standard. More precisely it implements webgpu.h that is a one-to-one mapping with the WebGPU IDL. Dawn is meant to be integrated as part of a larger system and is the underlying implementation of WebGPU in Chromium.
Dawn provides several WebGPU building blocks:
webgpu.h version that Dawn implements.webgpu.h.Helpful links:
Developer documentation:
User documentation: (TODO, figure out what overlaps with the webgpu.h docs)
BSD 3-Clause License, please see LICENSE.
This is not an officially supported Google product.