2021-06-02 17:23:03 +00:00
|
|
|
type ArrayType = [[stride(16)]] array<i32, 4>;
|
|
|
|
|
|
|
|
[[block]]
|
|
|
|
struct S {
|
|
|
|
arr : ArrayType;
|
|
|
|
};
|
|
|
|
|
|
|
|
var<private> src_private : ArrayType;
|
|
|
|
|
|
|
|
var<workgroup> src_workgroup : ArrayType;
|
|
|
|
|
|
|
|
[[group(0), binding(0)]] var<uniform> src_uniform : S;
|
|
|
|
|
2021-06-04 20:41:47 +00:00
|
|
|
[[group(0), binding(1)]] var<storage, read_write> src_storage : S;
|
2021-06-02 17:23:03 +00:00
|
|
|
|
|
|
|
var<workgroup> dst : ArrayType;
|
|
|
|
|
|
|
|
var<workgroup> dst_nested : array<array<array<i32, 2>, 3>, 4>;
|
|
|
|
|
|
|
|
fn ret_arr() -> ArrayType {
|
|
|
|
return ArrayType();
|
|
|
|
}
|
|
|
|
|
|
|
|
fn ret_struct_arr() -> S {
|
|
|
|
return S();
|
|
|
|
}
|
|
|
|
|
|
|
|
fn foo(src_param : ArrayType) {
|
|
|
|
var src_function : ArrayType;
|
|
|
|
dst = ArrayType(1, 2, 3, 3);
|
|
|
|
dst = src_param;
|
|
|
|
dst = ret_arr();
|
|
|
|
let src_let : ArrayType = ArrayType();
|
|
|
|
dst = src_let;
|
|
|
|
dst = src_function;
|
|
|
|
dst = src_private;
|
|
|
|
dst = src_workgroup;
|
|
|
|
dst = ret_struct_arr().arr;
|
|
|
|
dst = src_uniform.arr;
|
|
|
|
dst = src_storage.arr;
|
|
|
|
var src_nested : array<array<array<i32, 2>, 3>, 4>;
|
|
|
|
dst_nested = src_nested;
|
|
|
|
}
|