| #include <metal_stdlib> |
| |
| using namespace metal; |
| struct tint_private_vars_struct { |
| bool tint_discarded; |
| }; |
| |
| bool call_discard(thread tint_private_vars_struct* const tint_private_vars) { |
| (*(tint_private_vars)).tint_discarded = true; |
| return true; |
| } |
| |
| fragment void f() { |
| thread tint_private_vars_struct tint_private_vars = {}; |
| tint_private_vars.tint_discarded = false; |
| bool v = call_discard(&(tint_private_vars)); |
| bool also_unreachable = false; |
| if (tint_private_vars.tint_discarded) { |
| discard_fragment(); |
| } |
| return; |
| } |
| |