James Price | 94ac078 | 2021-06-02 17:23:03 +0000 | [diff] [blame] | 1 | #include <metal_stdlib> |
| 2 | |
| 3 | using namespace metal; |
| 4 | struct tint_array_wrapper_0 { |
| 5 | int array[4]; |
| 6 | }; |
| 7 | struct S { |
| 8 | tint_array_wrapper_0 arr; |
| 9 | }; |
| 10 | struct tint_array_wrapper_1 { |
| 11 | tint_array_wrapper_0 array[2]; |
| 12 | }; |
| 13 | |
| 14 | void foo() { |
| 15 | tint_array_wrapper_0 const src = {}; |
| 16 | tint_array_wrapper_0 dst = {0}; |
| 17 | S dst_struct = {}; |
| 18 | tint_array_wrapper_1 dst_array = {{0}}; |
| 19 | thread tint_array_wrapper_0* const dst_ptr = &(dst); |
| 20 | thread S* const dst_struct_ptr = &(dst_struct); |
| 21 | thread tint_array_wrapper_1* const dst_array_ptr = &(dst_array); |
| 22 | dst_struct.arr = src; |
| 23 | dst_array.array[1] = src; |
| 24 | *(dst_ptr) = src; |
| 25 | (*(dst_struct_ptr)).arr = src; |
| 26 | (*(dst_array_ptr)).array[0] = src; |
| 27 | } |
| 28 | |