blob: 4f6c8a4451b6204f6e471c05fa6b230e4aef1aa3 [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
struct tint_private_vars_struct {
bool tint_discarded;
};
void foo(thread tint_private_vars_struct* const tint_private_vars, device int* const tint_symbol_2) {
if ((*(tint_symbol_2) < 0)) {
(*(tint_private_vars)).tint_discarded = true;
}
}
void bar(thread tint_private_vars_struct* const tint_private_vars, device float* const tint_symbol_3) {
float const tint_symbol_1 = dfdx(1.0f);
if (!((*(tint_private_vars)).tint_discarded)) {
*(tint_symbol_3) = tint_symbol_1;
}
}
fragment void tint_symbol(device int* tint_symbol_4 [[buffer(0)]], device float* tint_symbol_5 [[buffer(1)]]) {
thread tint_private_vars_struct tint_private_vars = {};
tint_private_vars.tint_discarded = false;
foo(&(tint_private_vars), tint_symbol_4);
bar(&(tint_private_vars), tint_symbol_5);
if (tint_private_vars.tint_discarded) {
discard_fragment();
}
return;
}