blob: 41ab9c19319a375b8aa82253db9e1cb7869d35cb [file] [log] [blame]
Stephen White671d9702022-01-21 18:40:18 +00001#version 310 es
Stephen White671d9702022-01-21 18:40:18 +00002
3layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
4void unused_entry_point() {
5 return;
6}
Stephen White671d9702022-01-21 18:40:18 +00007struct S {
8 ivec4 arr[4];
9};
Stephen Whitee2f35ba2022-01-26 16:48:55 +000010
Zhaoming Jiang6ab5d3c2022-11-02 02:25:38 +000011struct S_nested {
12 int arr[4][3][2];
13};
14
Stephen White671d9702022-01-21 18:40:18 +000015ivec4 src_private[4] = ivec4[4](ivec4(0, 0, 0, 0), ivec4(0, 0, 0, 0), ivec4(0, 0, 0, 0), ivec4(0, 0, 0, 0));
16shared ivec4 src_workgroup[4];
Stephen White05d8b022022-09-13 19:48:51 +000017layout(binding = 0, std140) uniform src_uniform_block_ubo {
Stephen White863d9ed2022-09-02 19:19:10 +000018 S inner;
Stephen White671d9702022-01-21 18:40:18 +000019} src_uniform;
Stephen Whitee2f35ba2022-01-26 16:48:55 +000020
Stephen White863d9ed2022-09-02 19:19:10 +000021layout(binding = 1, std430) buffer src_uniform_block_ssbo {
22 S inner;
Stephen White671d9702022-01-21 18:40:18 +000023} src_storage;
Stephen White863d9ed2022-09-02 19:19:10 +000024
25layout(binding = 2, std430) buffer src_uniform_block_ssbo_1 {
26 S inner;
Stephen White671d9702022-01-21 18:40:18 +000027} dst;
Stephen White863d9ed2022-09-02 19:19:10 +000028
Zhaoming Jiang6ab5d3c2022-11-02 02:25:38 +000029layout(binding = 3, std430) buffer dst_nested_block_ssbo {
30 S_nested inner;
Stephen White671d9702022-01-21 18:40:18 +000031} dst_nested;
Stephen White863d9ed2022-09-02 19:19:10 +000032
Stephen White671d9702022-01-21 18:40:18 +000033ivec4[4] ret_arr() {
Ben Claytonda353b42023-03-08 21:48:45 +000034 ivec4 tint_symbol_1[4] = ivec4[4](ivec4(0), ivec4(0), ivec4(0), ivec4(0));
35 return tint_symbol_1;
Stephen White671d9702022-01-21 18:40:18 +000036}
37
38S ret_struct_arr() {
Ben Claytonda353b42023-03-08 21:48:45 +000039 S tint_symbol_2 = S(ivec4[4](ivec4(0), ivec4(0), ivec4(0), ivec4(0)));
40 return tint_symbol_2;
Stephen White671d9702022-01-21 18:40:18 +000041}
42
43void foo(ivec4 src_param[4]) {
44 ivec4 src_function[4] = ivec4[4](ivec4(0, 0, 0, 0), ivec4(0, 0, 0, 0), ivec4(0, 0, 0, 0), ivec4(0, 0, 0, 0));
Ben Claytonda353b42023-03-08 21:48:45 +000045 ivec4 tint_symbol_3[4] = ivec4[4](ivec4(1), ivec4(2), ivec4(3), ivec4(3));
46 dst.inner.arr = tint_symbol_3;
Stephen White863d9ed2022-09-02 19:19:10 +000047 dst.inner.arr = src_param;
Ben Claytonda353b42023-03-08 21:48:45 +000048 dst.inner.arr = ret_arr();
Ben Clayton19576e92022-06-28 12:44:16 +000049 ivec4 src_let[4] = ivec4[4](ivec4(0), ivec4(0), ivec4(0), ivec4(0));
Stephen White863d9ed2022-09-02 19:19:10 +000050 dst.inner.arr = src_let;
51 dst.inner.arr = src_function;
52 dst.inner.arr = src_private;
53 dst.inner.arr = src_workgroup;
Ben Claytonda353b42023-03-08 21:48:45 +000054 S tint_symbol = ret_struct_arr();
55 dst.inner.arr = tint_symbol.arr;
Stephen White863d9ed2022-09-02 19:19:10 +000056 dst.inner.arr = src_uniform.inner.arr;
57 dst.inner.arr = src_storage.inner.arr;
Stephen White671d9702022-01-21 18:40:18 +000058 int src_nested[4][3][2] = int[4][3][2](int[3][2](int[2](0, 0), int[2](0, 0), int[2](0, 0)), int[3][2](int[2](0, 0), int[2](0, 0), int[2](0, 0)), int[3][2](int[2](0, 0), int[2](0, 0), int[2](0, 0)), int[3][2](int[2](0, 0), int[2](0, 0), int[2](0, 0)));
Zhaoming Jiang6ab5d3c2022-11-02 02:25:38 +000059 dst_nested.inner.arr = src_nested;
Stephen White671d9702022-01-21 18:40:18 +000060}
Stephen Whitee2f35ba2022-01-26 16:48:55 +000061