Ben Clayton 5ac96af72c test: Add FXC test cases for indexing arrays in structs
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>
2021-07-23 16:44:52 +00:00

23 lines
427 B
WebGPU Shading Language

[[block]]
struct UBO {
dynamic_idx: i32;
};
[[group(0), binding(0)]] var<uniform> ubo: UBO;
[[block]]
struct Result {
out: i32;
};
[[group(0), binding(2)]] var<storage, read_write> result: Result;
[[block]]
struct SSBO {
data: array<i32, 4>;
};
[[group(0), binding(1)]] var<storage, read_write> ssbo: SSBO;
[[stage(compute), workgroup_size(1)]]
fn f() {
ssbo.data[ubo.dynamic_idx] = 1;
result.out = ssbo.data[3];
}