| #include <metal_stdlib> |
| using namespace metal; |
| |
| struct tint_module_vars_struct { |
| thread float2* v2f; |
| thread int3* v3i; |
| thread uint4* v4u; |
| thread bool2* v2b; |
| }; |
| |
| void foo(tint_module_vars_struct tint_module_vars) { |
| int i = 0; |
| (*tint_module_vars.v2f)[i] = 1.0f; |
| (*tint_module_vars.v3i)[i] = 1; |
| (*tint_module_vars.v4u)[i] = 1u; |
| (*tint_module_vars.v2b)[i] = true; |
| } |
| |
| kernel void tint_symbol() { |
| thread float2 v2f = 0.0f; |
| thread int3 v3i = 0; |
| thread uint4 v4u = 0u; |
| thread bool2 v2b = false; |
| tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.v2f=(&v2f), .v3i=(&v3i), .v4u=(&v4u), .v2b=(&v2b)}; |
| { |
| int i = 0; |
| while(true) { |
| if ((i < 2)) { |
| } else { |
| break; |
| } |
| foo(tint_module_vars); |
| { |
| i = (i + 1); |
| } |
| continue; |
| } |
| } |
| } |