[utils] Implements RawSpan and ityp::raw_span. - These span variants are backed with a raw_ptr<T> instead of a T*. These variants are intended to be used as member variables so that backuprefptr reference tracking isn't skipped when using spans. - This change also updates ReinterpretSpan and SpanAs[Writable]Bytes to support usage with the raw span variants. - To support using raw_ptr whose move operators null out the src, we also had to update the relevant constructors to match std::span semantics. - The unit tests are updated to now test both the raw and non-raw variants via typed test. Most of the changes are just converting from using Span and ityp::span to using macros SPAN and ITYP_SPAN. Added new raw_span_tests.cc that verify that the raw_ptr tracking is working and that dangling spans crash appropriately when the testing environment permits. Bug: 526537224 Change-Id: I9d6a364e3789f2917b9985c22f15af5153e3f198 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/339076 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: 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.