Stephen White | 671d970 | 2022-01-21 18:40:18 +0000 | [diff] [blame] | 1 | #version 310 es |
Stephen White | 671d970 | 2022-01-21 18:40:18 +0000 | [diff] [blame] | 2 | |
| 3 | layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; |
| 4 | void unused_entry_point() { |
| 5 | return; |
| 6 | } |
Stephen White | 671d970 | 2022-01-21 18:40:18 +0000 | [diff] [blame] | 7 | struct S { |
| 8 | ivec4 arr[4]; |
| 9 | }; |
| 10 | |
| 11 | ivec4 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)); |
| 12 | shared ivec4 src_workgroup[4]; |
Stephen White | 05d8b02 | 2022-09-13 19:48:51 +0000 | [diff] [blame] | 13 | layout(binding = 0, std140) uniform src_uniform_block_ubo { |
Stephen White | 863d9ed | 2022-09-02 19:19:10 +0000 | [diff] [blame] | 14 | S inner; |
Stephen White | 671d970 | 2022-01-21 18:40:18 +0000 | [diff] [blame] | 15 | } src_uniform; |
Stephen White | e2f35ba | 2022-01-26 16:48:55 +0000 | [diff] [blame] | 16 | |
Stephen White | 863d9ed | 2022-09-02 19:19:10 +0000 | [diff] [blame] | 17 | layout(binding = 1, std430) buffer src_uniform_block_ssbo { |
| 18 | S inner; |
Stephen White | 671d970 | 2022-01-21 18:40:18 +0000 | [diff] [blame] | 19 | } src_storage; |
Stephen White | 863d9ed | 2022-09-02 19:19:10 +0000 | [diff] [blame] | 20 | |
Stephen White | 671d970 | 2022-01-21 18:40:18 +0000 | [diff] [blame] | 21 | ivec4 dst[4] = ivec4[4](ivec4(0, 0, 0, 0), ivec4(0, 0, 0, 0), ivec4(0, 0, 0, 0), ivec4(0, 0, 0, 0)); |
| 22 | int 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 White | 671d970 | 2022-01-21 18:40:18 +0000 | [diff] [blame] | 23 | ivec4[4] ret_arr() { |
Ben Clayton | 19576e9 | 2022-06-28 12:44:16 +0000 | [diff] [blame] | 24 | ivec4 tint_symbol_1[4] = ivec4[4](ivec4(0), ivec4(0), ivec4(0), ivec4(0)); |
Antonio Maiorano | 93baaae | 2022-03-15 15:35:13 +0000 | [diff] [blame] | 25 | return tint_symbol_1; |
Stephen White | 671d970 | 2022-01-21 18:40:18 +0000 | [diff] [blame] | 26 | } |
| 27 | |
| 28 | S ret_struct_arr() { |
Ben Clayton | 6c098ba | 2022-07-14 20:46:39 +0000 | [diff] [blame] | 29 | S tint_symbol_2 = S(ivec4[4](ivec4(0), ivec4(0), ivec4(0), ivec4(0))); |
Antonio Maiorano | 93baaae | 2022-03-15 15:35:13 +0000 | [diff] [blame] | 30 | return tint_symbol_2; |
Stephen White | 671d970 | 2022-01-21 18:40:18 +0000 | [diff] [blame] | 31 | } |
| 32 | |
| 33 | void 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 Maiorano | 93baaae | 2022-03-15 15:35:13 +0000 | [diff] [blame] | 35 | ivec4 tint_symbol_3[4] = ivec4[4](ivec4(1), ivec4(2), ivec4(3), ivec4(3)); |
| 36 | dst = tint_symbol_3; |
Stephen White | 671d970 | 2022-01-21 18:40:18 +0000 | [diff] [blame] | 37 | dst = src_param; |
| 38 | dst = ret_arr(); |
Ben Clayton | 19576e9 | 2022-06-28 12:44:16 +0000 | [diff] [blame] | 39 | ivec4 src_let[4] = ivec4[4](ivec4(0), ivec4(0), ivec4(0), ivec4(0)); |
Stephen White | 671d970 | 2022-01-21 18:40:18 +0000 | [diff] [blame] | 40 | dst = src_let; |
| 41 | dst = src_function; |
| 42 | dst = src_private; |
| 43 | dst = src_workgroup; |
Antonio Maiorano | 93baaae | 2022-03-15 15:35:13 +0000 | [diff] [blame] | 44 | S tint_symbol = ret_struct_arr(); |
| 45 | dst = tint_symbol.arr; |
Stephen White | 863d9ed | 2022-09-02 19:19:10 +0000 | [diff] [blame] | 46 | dst = src_uniform.inner.arr; |
| 47 | dst = src_storage.inner.arr; |
Stephen White | 671d970 | 2022-01-21 18:40:18 +0000 | [diff] [blame] | 48 | 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 White | e2f35ba | 2022-01-26 16:48:55 +0000 | [diff] [blame] | 51 | |