| #include <metal_stdlib> |
| using namespace metal; |
| struct tint_module_vars_struct { |
| const constant float3x3* u; |
| device float3x3* s; |
| }; |
| |
| void tint_store_and_preserve_padding(device float3x3* const target, float3x3 value_param) { |
| (*target)[0u] = value_param[0u]; |
| (*target)[1u] = value_param[1u]; |
| (*target)[2u] = value_param[2u]; |
| } |
| kernel void f(const constant float3x3* u [[buffer(0)]], device float3x3* s [[buffer(1)]]) { |
| tint_module_vars_struct const tint_module_vars = {.u=u, .s=s}; |
| tint_store_and_preserve_padding(tint_module_vars.s, (*tint_module_vars.u)); |
| (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0]; |
| (*tint_module_vars.s)[1] = (*tint_module_vars.u)[0].zxy; |
| (*tint_module_vars.s)[0][1] = (*tint_module_vars.u)[1][0]; |
| } |