mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-14 11:21:40 +00:00
Bug: tint:998 Change-Id: I6c8b8f7ec9a9b6d5a721fa01bab647641e33b3b2 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/58281 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: David Neto <dneto@google.com>
19 lines
350 B
WebGPU Shading Language
19 lines
350 B
WebGPU Shading Language
[[block]] struct Constants {
|
|
zero: u32;
|
|
};
|
|
[[group(1), binding(0)]] var<uniform> constants: Constants;
|
|
|
|
[[block]] struct Result {
|
|
value: u32;
|
|
};
|
|
[[group(1), binding(1)]] var<storage, write> result: Result;
|
|
|
|
struct S {
|
|
data: array<u32, 3>;
|
|
};
|
|
var<private> s: S;
|
|
|
|
[[stage(compute), workgroup_size(1)]]
|
|
fn main() {
|
|
s.data[constants.zero] = 0u;
|
|
} |