Reland "[utils] Adds Span::FillBytes as a workaround for ASAN timeouts." - Fixes the compilation error by wrapping the memset call with DAWN_UNSAFE_BUFFER and corresponding SAFETY message. This is a reland of commit d0dc9fd134a521b7e68605a7bc6769c273e3e51b Bug: 545842615 Original change's description: > [utils] Adds Span::FillBytes as a workaround for ASAN timeouts. > > - In the bug below, we identified that as a part of spanification, > we updated some memset calls to std::ranges::fill. While this > was good for normal builds, this caused timeout issues in ASAN > builds because under ASAN std::ranges::fill obscures the loop > structure from the compiler's loop recognition. When dealing > with large buffers, this translates to billions of instrumented > stores causing timeouts. > - This change introduces the Span::FillBytes helper that addresses > these timeouts by falling back to using memset when built for > ASAN. > > Bug: 545842615 > Change-Id: I431d16af99036cf8a2ba45ef173aa119e115804f > Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/338335 > Commit-Queue: dan sinclair <dsinclair@chromium.org> > Auto-Submit: Loko Kung <lokokung@google.com> > Reviewed-by: dan sinclair <dsinclair@chromium.org> > Reviewed-by: Antonio Maiorano <amaiorano@google.com> Bug: 545842615 Change-Id: Idba5200432ffb9e8a04918ba947a1b383ce6edc8 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/338795 Commit-Queue: Loko Kung <lokokung@google.com> Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org> Auto-Submit: Loko Kung <lokokung@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.