| #include <metal_stdlib> |
| using namespace metal; |
| |
| struct tint_module_vars_struct { |
| device int* non_uniform_global; |
| device float* output; |
| thread bool* continue_execution; |
| }; |
| |
| fragment void tint_symbol(device int* non_uniform_global [[buffer(0)]], device float* output [[buffer(1)]]) { |
| thread bool continue_execution = true; |
| tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.non_uniform_global=non_uniform_global, .output=output, .continue_execution=(&continue_execution)}; |
| if (((*tint_module_vars.non_uniform_global) < 0)) { |
| (*tint_module_vars.continue_execution) = false; |
| } |
| float const v = dfdx(1.0f); |
| if ((*tint_module_vars.continue_execution)) { |
| (*tint_module_vars.output) = v; |
| } |
| if (!((*tint_module_vars.continue_execution))) { |
| discard_fragment(); |
| } |
| } |