blob: 6373d1b5f35834023abef28aa6da07b7582c3fbd [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
#define TINT_ISOLATE_UB(VOLATILE_NAME) \
volatile bool VOLATILE_NAME = true; \
if (VOLATILE_NAME)
struct tint_private_vars_struct {
bool tint_discarded;
};
fragment void tint_symbol(device int* tint_symbol_2 [[buffer(0)]], device float* tint_symbol_3 [[buffer(1)]]) {
thread tint_private_vars_struct tint_private_vars = {};
tint_private_vars.tint_discarded = false;
if ((*(tint_symbol_2) < 0)) {
tint_private_vars.tint_discarded = true;
}
float const tint_symbol_1 = dfdx(1.0f);
if (!(tint_private_vars.tint_discarded)) {
*(tint_symbol_3) = tint_symbol_1;
}
if ((*(tint_symbol_3) < 0.0f)) {
int i = 0;
TINT_ISOLATE_UB(tint_volatile_true) while(true) {
if ((*(tint_symbol_3) > float(i))) {
if (!(tint_private_vars.tint_discarded)) {
*(tint_symbol_3) = float(i);
}
if (tint_private_vars.tint_discarded) {
discard_fragment();
}
return;
}
{
i = as_type<int>((as_type<uint>(i) + as_type<uint>(1)));
if ((i == 5)) { break; }
}
}
if (tint_private_vars.tint_discarded) {
discard_fragment();
}
return;
}
if (tint_private_vars.tint_discarded) {
discard_fragment();
}
return;
}