| #include <metal_stdlib> |
| using namespace metal; |
| |
| struct tint_module_vars_struct { |
| const constant float2x2* u; |
| thread float2x2* p; |
| }; |
| |
| kernel void f(const constant float2x2* u [[buffer(0)]]) { |
| thread float2x2 p = float2x2(0.0f); |
| tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .p=(&p)}; |
| (*tint_module_vars.p) = (*tint_module_vars.u); |
| (*tint_module_vars.p)[1u] = (*tint_module_vars.u)[0u]; |
| (*tint_module_vars.p)[1u] = (*tint_module_vars.u)[0u].yx; |
| (*tint_module_vars.p)[0u].y = (*tint_module_vars.u)[1u].x; |
| } |