| #include <metal_stdlib> |
| using namespace metal; |
| struct tint_module_vars_struct { |
| const constant float3x3* m; |
| thread int* counter; |
| }; |
| |
| int i(tint_module_vars_struct tint_module_vars) { |
| (*tint_module_vars.counter) = ((*tint_module_vars.counter) + 1); |
| return (*tint_module_vars.counter); |
| } |
| kernel void f(const constant float3x3* m [[buffer(0)]]) { |
| thread int counter = 0; |
| tint_module_vars_struct const tint_module_vars = {.m=m, .counter=(&counter)}; |
| const constant float3x3* const p_m = tint_module_vars.m; |
| const constant float3* const p_m_i = (&(*p_m)[i(tint_module_vars)]); |
| float3x3 const l_m = (*p_m); |
| float3 const l_m_i = (*p_m_i); |
| } |