mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-14 11:21:40 +00:00
Also move: test/fxc_bugs/vector_assignment_in_loop to test/bug/fxc/vector_assignment_in_loop Change-Id: I7bbfc476fdb7a3296025609625e322fed8d16285 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59444 Auto-Submit: Ben Clayton <bclayton@google.com> Commit-Queue: James Price <jrprice@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: James Price <jrprice@google.com>
22 lines
367 B
WebGPU Shading Language
22 lines
367 B
WebGPU Shading Language
[[block]]
|
|
struct UBO {
|
|
dynamic_idx: i32;
|
|
};
|
|
[[group(0), binding(0)]] var<uniform> ubo: UBO;
|
|
struct S {
|
|
data: array<i32, 64>;
|
|
};
|
|
[[block]]
|
|
struct Result {
|
|
out: i32;
|
|
};
|
|
[[group(0), binding(1)]] var<storage, read_write> result: Result;
|
|
|
|
var<private> s : S;
|
|
|
|
[[stage(compute), workgroup_size(1)]]
|
|
fn f() {
|
|
s.data[ubo.dynamic_idx] = 1;
|
|
result.out = s.data[3];
|
|
}
|