mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-28 10:11:33 +00:00
This CL adds a SubstituteOverride transform which will convert an `override` into a `const`. The transform is provided a map of (string, double) which matches what the WebGPU API accepts as data for overrides. Bug: tint:1582 Change-Id: I6e6bf51b98ce4d4746f8de55128666c36735e585 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96760 Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Dan Sinclair <dsinclair@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com>
10 lines
140 B
WebGPU Shading Language
10 lines
140 B
WebGPU Shading Language
// flags: --overrides 1234=0
|
|
@id(1234) override o : bool = true;
|
|
|
|
@compute @workgroup_size(1)
|
|
fn main() {
|
|
if o {
|
|
_ = o;
|
|
}
|
|
}
|