2023-01-24 14:55:17 +00:00
|
|
|
alias ArrayType = array<vec4<i32>, 4>;
|
2021-06-02 17:23:03 +00:00
|
|
|
|
|
|
|
struct S {
|
2022-03-28 14:31:22 +00:00
|
|
|
arr : ArrayType,
|
2022-01-19 18:11:17 +00:00
|
|
|
}
|
2021-06-02 17:23:03 +00:00
|
|
|
|
|
|
|
struct S_nested {
|
2022-03-28 14:31:22 +00:00
|
|
|
arr : array<array<array<i32, 2>, 3>, 4>,
|
2022-01-19 18:11:17 +00:00
|
|
|
}
|
2021-06-02 17:23:03 +00:00
|
|
|
|
|
|
|
var<private> src_private : ArrayType;
|
|
|
|
|
|
|
|
var<workgroup> src_workgroup : ArrayType;
|
|
|
|
|
2022-01-19 22:46:57 +00:00
|
|
|
@group(0) @binding(0) var<uniform> src_uniform : S;
|
2021-06-02 17:23:03 +00:00
|
|
|
|
2022-01-19 22:46:57 +00:00
|
|
|
@group(0) @binding(1) var<storage, read_write> src_storage : S;
|
2021-06-02 17:23:03 +00:00
|
|
|
|
2022-01-19 22:46:57 +00:00
|
|
|
@group(0) @binding(2) var<storage, read_write> dst : S;
|
2021-06-02 17:23:03 +00:00
|
|
|
|
2022-01-19 22:46:57 +00:00
|
|
|
@group(0) @binding(3) var<storage, read_write> dst_nested : S_nested;
|
2021-06-02 17:23:03 +00:00
|
|
|
|
|
|
|
fn ret_arr() -> ArrayType {
|
|
|
|
return ArrayType();
|
|
|
|
}
|
|
|
|
|
|
|
|
fn ret_struct_arr() -> S {
|
|
|
|
return S();
|
|
|
|
}
|
|
|
|
|
|
|
|
fn foo(src_param : ArrayType) {
|
|
|
|
var src_function : ArrayType;
|
2022-01-20 22:11:07 +00:00
|
|
|
dst.arr = ArrayType(vec4(1), vec4(2), vec4(3), vec4(3));
|
2021-06-02 17:23:03 +00:00
|
|
|
dst.arr = src_param;
|
|
|
|
dst.arr = ret_arr();
|
|
|
|
let src_let : ArrayType = ArrayType();
|
|
|
|
dst.arr = src_let;
|
|
|
|
dst.arr = src_function;
|
|
|
|
dst.arr = src_private;
|
|
|
|
dst.arr = src_workgroup;
|
|
|
|
dst.arr = ret_struct_arr().arr;
|
|
|
|
dst.arr = src_uniform.arr;
|
|
|
|
dst.arr = src_storage.arr;
|
|
|
|
var src_nested : array<array<array<i32, 2>, 3>, 4>;
|
|
|
|
dst_nested.arr = src_nested;
|
|
|
|
}
|