| #include <metal_stdlib> |
| |
| using namespace metal; |
| struct tint_private_vars_struct { |
| int a; |
| float4 b; |
| float2x2 c; |
| }; |
| |
| int tint_div(int lhs, int rhs) { |
| return (lhs / select(rhs, 1, bool((rhs == 0) | bool((lhs == (-2147483647 - 1)) & (rhs == -1))))); |
| } |
| |
| void foo(thread tint_private_vars_struct* const tint_private_vars) { |
| (*(tint_private_vars)).a = tint_div((*(tint_private_vars)).a, 2); |
| (*(tint_private_vars)).b = ((*(tint_private_vars)).b * float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f))); |
| (*(tint_private_vars)).c = ((*(tint_private_vars)).c * 2.0f); |
| } |
| |