mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-18 17:35:30 +00:00
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>
This commit is contained in:
committed by
Tint LUCI CQ
parent
7204756d4d
commit
5ac96af72c
20
test/bug/fxc/dyn_array_idx/write/function.wgsl
Normal file
20
test/bug/fxc/dyn_array_idx/write/function.wgsl
Normal file
@@ -0,0 +1,20 @@
|
||||
[[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;
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn f() {
|
||||
var s : S;
|
||||
s.data[ubo.dynamic_idx] = 1;
|
||||
result.out = s.data[3];
|
||||
}
|
||||
Reference in New Issue
Block a user