blob: bc6ac3112f8857903152158c063cfdf84c0b8c9f [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};
10
11ivec4 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));
12shared ivec4 src_workgroup[4];
Stephen White05d8b022022-09-13 19:48:51 +000013layout(binding = 0, std140) uniform src_uniform_block_ubo {
Stephen White863d9ed2022-09-02 19:19:10 +000014 S inner;
Stephen White671d9702022-01-21 18:40:18 +000015} src_uniform;
Stephen Whitee2f35ba2022-01-26 16:48:55 +000016
Stephen White863d9ed2022-09-02 19:19:10 +000017layout(binding = 1, std430) buffer src_uniform_block_ssbo {
18 S inner;
Stephen White671d9702022-01-21 18:40:18 +000019} src_storage;
Stephen White863d9ed2022-09-02 19:19:10 +000020
Stephen White671d9702022-01-21 18:40:18 +000021ivec4 dst[4] = ivec4[4](ivec4(0, 0, 0, 0), ivec4(0, 0, 0, 0), ivec4(0, 0, 0, 0), ivec4(0, 0, 0, 0));
22int dst_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)));
Stephen White671d9702022-01-21 18:40:18 +000023ivec4[4] ret_arr() {
Ben Clayton19576e92022-06-28 12:44:16 +000024 ivec4 tint_symbol_1[4] = ivec4[4](ivec4(0), ivec4(0), ivec4(0), ivec4(0));
Antonio Maiorano93baaae2022-03-15 15:35:13 +000025 return tint_symbol_1;
Stephen White671d9702022-01-21 18:40:18 +000026}
27
28S ret_struct_arr() {
Ben Clayton6c098ba2022-07-14 20:46:39 +000029 S tint_symbol_2 = S(ivec4[4](ivec4(0), ivec4(0), ivec4(0), ivec4(0)));
Antonio Maiorano93baaae2022-03-15 15:35:13 +000030 return tint_symbol_2;
Stephen White671d9702022-01-21 18:40:18 +000031}
32
33void foo(ivec4 src_param[4]) {
34 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));
Antonio Maiorano93baaae2022-03-15 15:35:13 +000035 ivec4 tint_symbol_3[4] = ivec4[4](ivec4(1), ivec4(2), ivec4(3), ivec4(3));
36 dst = tint_symbol_3;
Stephen White671d9702022-01-21 18:40:18 +000037 dst = src_param;
38 dst = ret_arr();
Ben Clayton19576e92022-06-28 12:44:16 +000039 ivec4 src_let[4] = ivec4[4](ivec4(0), ivec4(0), ivec4(0), ivec4(0));
Stephen White671d9702022-01-21 18:40:18 +000040 dst = src_let;
41 dst = src_function;
42 dst = src_private;
43 dst = src_workgroup;
Antonio Maiorano93baaae2022-03-15 15:35:13 +000044 S tint_symbol = ret_struct_arr();
45 dst = tint_symbol.arr;
Stephen White863d9ed2022-09-02 19:19:10 +000046 dst = src_uniform.inner.arr;
47 dst = src_storage.inner.arr;
Stephen White671d9702022-01-21 18:40:18 +000048 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)));
49 dst_nested = src_nested;
50}
Stephen Whitee2f35ba2022-01-26 16:48:55 +000051