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
|
|
|
}
|
|
|
|
|
|
|
|
type Arr = array<strided_arr, 2u>;
|
|
|
|
|
|
|
|
type Arr_1 = array<Arr, 3u>;
|
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
type Arr_2 = array<strided_arr_1, 4u>;
|
|
|
|
|
|
|
|
struct S {
|
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-05-05 20:23:40 +00:00
|
|
|
@stage(compute) @workgroup_size(1i, 1i, 1i)
|
2022-02-04 15:39:34 +00:00
|
|
|
fn f() {
|
|
|
|
f_1();
|
|
|
|
}
|