commit | 2d501c5575e62e0a813c077d8fa6182bc7cc4496 | [log] [tgz] |
---|---|---|
author | Ben Clayton <bclayton@google.com> | Wed Jan 17 01:27:37 2024 +0000 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Jan 17 01:27:37 2024 +0000 |
tree | e9bb1fa1db47a626d1a6d1e1d7078bcee4036446 | |
parent | 93140ed00ca592168192bd0822040c4f7fcefea6 [diff] |
[tint] Fix emission of module-scope struct initializers Constant structure initializers need to be assigned directly to a variable in HLSL. We were emitting these as `const` variables for both module-scope and function-scope. Module-scope `const` variables are not held in the program bitcode, but are expected to be provided as a cbuffer binding, which dawn was not providing. Instead emit these always as global scope `static const` variables. Add a dawn end2end test for `var<private>` variables initialized with a `struct` Bug: tint:2142 Change-Id: I03c7c94a1729dcfbc077bcef01495a9fbbff0290 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/169940 Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Antonio Maiorano <amaiorano@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.