2021-06-02 17:23:03 +00:00
|
|
|
#include <metal_stdlib>
|
|
|
|
|
|
|
|
using namespace metal;
|
2021-06-16 09:19:36 +00:00
|
|
|
struct tint_array_wrapper {
|
|
|
|
float arr[4];
|
2021-06-02 17:23:03 +00:00
|
|
|
};
|
|
|
|
|
2021-06-16 09:19:36 +00:00
|
|
|
float f1(tint_array_wrapper a) {
|
|
|
|
return a.arr[3];
|
2021-06-02 17:23:03 +00:00
|
|
|
}
|
|
|
|
|
2022-02-09 23:55:51 +00:00
|
|
|
struct tint_array_wrapper_1 {
|
|
|
|
tint_array_wrapper arr[3];
|
|
|
|
};
|
|
|
|
|
2021-06-16 09:19:36 +00:00
|
|
|
float f2(tint_array_wrapper_1 a) {
|
|
|
|
return a.arr[2].arr[3];
|
2021-06-02 17:23:03 +00:00
|
|
|
}
|
|
|
|
|
2022-02-09 23:55:51 +00:00
|
|
|
struct tint_array_wrapper_2 {
|
|
|
|
tint_array_wrapper_1 arr[2];
|
|
|
|
};
|
|
|
|
|
2021-06-16 09:19:36 +00:00
|
|
|
float f3(tint_array_wrapper_2 a) {
|
|
|
|
return a.arr[1].arr[2].arr[3];
|
2021-06-02 17:23:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
kernel void tint_symbol() {
|
2021-06-16 09:19:36 +00:00
|
|
|
tint_array_wrapper const a1 = {.arr={}};
|
|
|
|
tint_array_wrapper_1 const a2 = {.arr={}};
|
|
|
|
tint_array_wrapper_2 const a3 = {.arr={}};
|
2021-06-02 17:23:03 +00:00
|
|
|
float const v1 = f1(a1);
|
|
|
|
float const v2 = f2(a2);
|
|
|
|
float const v3 = f3(a3);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|