Emit array<u32> Storage Buffer Sizes in HLSL and MSL Transforms The HLSL and MSL immediate transforms stored the storage buffer sizes as array<vec4<u32>>, which only forced a 16-byte alignment without benefit since immediate data is read at a 4-byte stride. Emit a tightly packed array<u32> from both transforms and drop the per-backend element-type branch in the shared ArrayLengthFromImmediates read. On Metal, upload the sizes at the matching 4-byte-aligned offset. Use Align for the Metal setBytes upload size and backing array capacity. Make IsPowerOfTwo constexpr so Align can be evaluated at compile time. Bug: 366291600, 536438952 Change-Id: Iaac084eec79ab1843edc3be7781a6ed61ceae2fa Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/324277 Commit-Queue: Shaobo Yan <shaoboyan@microsoft.com> Reviewed-by: 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.