Pass a Span to Expectation::Check Expectation::Check() took a raw pointer and a size, even though the readback data is already held as a Span<const std::byte>. Pass the span instead, and use ReinterpretSpan in the overrides to view it as a span of the expected element type. This replaces the raw pointer casts and indexing, which were wrapped in DAWN_UNSAFE_TODO or DAWN_UNSAFE_BUFFERS. ReinterpretSpan checks the alignment and that the size is a multiple of the element size. Bug: 439062058 Change-Id: Icb6c5bbe0f7fd62b20550e1adcc6b3b36c54dc02 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/357055 Auto-Submit: Arthur Sonzogni <arthursonzogni@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
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.