[dawn][native] Add support for typed spans in input structures Changes the code generation of the wgpu_structs_autogen.h used in dawn_platform.h to use ityp::span when converting size_t + T* (which a TypedInteger index or just size_t). Adds kOffsetOfSize/Data to dawn::Span to check via a static_assert that the layout of the struct stays the same as webgpu.h so we can directly cast from one type to another. Spanify VertexBufferLayout to exercise the new codegen path. Bug: 515272358 Change-Id: Iebc68209908e5f2181124455a89be6f183813e08 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/317155 Reviewed-by: Loko Kung <lokokung@google.com> Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Corentin Wallez <cwallez@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.