Contact emails
jrp...@google.com
Explainer
https://github.com/gpuweb/gpuweb/issues/4973
Specification
https://www.w3.org/TR/WGSL/#language_extension-uniform_buffer_standard_layout
Summary
Functionality added to the WebGPU spec after its first shipment in a browser.
Uniform buffers declared in WGSL shaders are no longer required to have 16-byte alignment on array elements, or to pad nested structure offsets to a multiple of 16 bytes.
Blink component
Blink>WebGPU
Web Feature ID
webgpu
Motivation
This feature simplifies the use of uniform buffers in WGSL shaders by unifying their constraints with those of storage buffers. Without this, developers are required to align all array elements to 16 bytes and pad nested structures to achieve a 16-byte offset.
Initial public proposal
https://github.com/gpuweb/gpuweb/pull/5347
TAG review
No information provided
TAG review status
Pending
Risks
Debuggability
None
Will this feature be supported on all six Blink platforms
(Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?
Yes
All platforms will eventually have support. Will immediately be available on Android, Android WebView, ChromeOS, Mac, and Windows, since those platforms already support WebGPU. Linux is planned to have WebGPU support in the future, so this feature will become available when WebGPU does.
Yes
WebGPU/WGSL have a conformance test suite (
https://github.com/gpuweb/cts) that is regularly pulled into Chromium and part of the testing of Dawn/Tint in Chromium. While the CTS can be embedded in WPT, the WebGPU team opted to keep it separate in Chromium testing to use a customized harness for robustness and performance.
CTS coverage for this feature was added here:
https://github.com/gpuweb/cts/pull/4484
Flag name on about://flags
Enable Unsafe WebGPU
Finch feature name
UnsafeWGSLFeatures
Rollout plan
Will ship enabled for all users
Requires code in //chrome?
False
Tracking bug
https://crbug.com/452662924
Estimated milestones
| Shipping on desktop | 144 |
| DevTrial on desktop | 143 |
| Shipping on Android | 144 |
| DevTrial on Android | 143 |
| Shipping on WebView | 144 |
Anticipated spec changes
Open questions about a feature may be a source of future web compat or
interop issues. Please list open issues (e.g. links to known github
issues in the project for the feature specification) whose resolution
may introduce web compat/interop risk (e.g., changing to naming or
structure of the API in a non-backward-compatible way).
No information provided
Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/6680245553987584?gate=6542931179732992