| #include <metal_stdlib> |
| using namespace metal; |
| |
| struct tint_module_vars_struct { |
| texture2d<int, access::read_write> tex; |
| }; |
| |
| void foo(tint_module_vars_struct tint_module_vars) { |
| { |
| uint2 tint_loop_idx = 0u; |
| int i = 0; |
| while(true) { |
| if (all((tint_loop_idx == uint2(4294967295u)))) { |
| break; |
| } |
| if ((i < 3)) { |
| } else { |
| break; |
| } |
| { |
| uint const tint_low_inc = (tint_loop_idx.x + 1u); |
| tint_loop_idx.x = tint_low_inc; |
| uint const tint_carry = uint((tint_low_inc == 0u)); |
| tint_loop_idx.y = (tint_loop_idx.y + tint_carry); |
| tint_module_vars.tex.write(int4(0), uint2(int2(0))); |
| const_cast<texture2d<int, access::read_write>thread &>(tint_module_vars.tex).fence(); |
| } |
| continue; |
| } |
| } |
| } |