blob: 603dbb50217b7e118c59a8ac5dac79d363d7206b [file] [log] [blame] [edit]
#include <metal_stdlib>
using namespace metal;
struct S1 {
int i;
};
struct S2 {
S1 s1;
};
struct S3 {
S2 s2;
};
struct tint_module_vars_struct {
thread S3* P;
device int* out;
};
[[max_total_threads_per_threadgroup(1)]]
kernel void v(device int* out [[buffer(0)]]) {
thread S3 P = S3{.s2=S2{.s1=S1{.i=42}}};
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.P=(&P), .out=out};
(*tint_module_vars.out) = (*tint_module_vars.P).s2.s1.i;
}