2022-02-04 15:39:34 +00:00
|
|
|
struct strided_arr {
|
|
|
|
@size(8)
|
2022-03-28 14:31:22 +00:00
|
|
|
el : f32,
|
2022-02-04 15:39:34 +00:00
|
|
|
}
|
|
|
|
|
2023-01-24 14:55:17 +00:00
|
|
|
alias Arr = array<strided_arr, 2u>;
|
2022-02-04 15:39:34 +00:00
|
|
|
|
2023-01-24 14:55:17 +00:00
|
|
|
alias Arr_1 = array<Arr, 3u>;
|
2022-02-04 15:39:34 +00:00
|
|
|
|
|
|
|
struct strided_arr_1 {
|
|
|
|
@size(128)
|
2022-03-28 14:31:22 +00:00
|
|
|
el : Arr_1,
|
2022-02-04 15:39:34 +00:00
|
|
|
}
|
|
|
|
|
2023-01-24 14:55:17 +00:00
|
|
|
alias Arr_2 = array<strided_arr_1, 4u>;
|
2022-02-04 15:39:34 +00:00
|
|
|
|
|
|
|
struct S {
|
2022-12-01 17:37:56 +00:00
|
|
|
/* @offset(0) */
|
2022-03-28 14:31:22 +00:00
|
|
|
a : Arr_2,
|
2022-02-04 15:39:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@group(0) @binding(0) var<storage, read_write> s : S;
|
|
|
|
|
|
|
|
fn f_1() {
|
|
|
|
let x_19 : Arr_2 = s.a;
|
2022-05-04 22:25:19 +00:00
|
|
|
let x_24 : Arr_1 = s.a[3i].el;
|
|
|
|
let x_28 : Arr = s.a[3i].el[2i];
|
|
|
|
let x_32 : f32 = s.a[3i].el[2i][1i].el;
|
2022-02-04 15:39:34 +00:00
|
|
|
s.a = array<strided_arr_1, 4u>();
|
2022-05-31 20:45:59 +00:00
|
|
|
s.a[3i].el[2i][1i].el = 5.0f;
|
2022-02-04 15:39:34 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2022-06-07 13:55:34 +00:00
|
|
|
@compute @workgroup_size(1i, 1i, 1i)
|
2022-02-04 15:39:34 +00:00
|
|
|
fn f() {
|
|
|
|
f_1();
|
|
|
|
}
|