blob: b7274261148c22b4c26f92cc629abb59a027a1f7 [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
struct tint_padded_array_element {
/* 0x0000 */ float el;
/* 0x0004 */ int8_t tint_pad[12];
};
struct tint_array_wrapper {
/* 0x0000 */ tint_padded_array_element arr[3];
};
struct buf0 {
/* 0x0000 */ tint_array_wrapper x_GLF_uniform_float_values;
};
struct tint_padded_array_element_1 {
/* 0x0000 */ int el;
/* 0x0004 */ int8_t tint_pad_1[12];
};
struct tint_array_wrapper_1 {
/* 0x0000 */ tint_padded_array_element_1 arr[2];
};
struct buf1 {
/* 0x0000 */ tint_array_wrapper_1 x_GLF_uniform_int_values;
};
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol_2 {
float4 x_GLF_color_1 [[color(0)]];
};
float f1_f1_(constant buf0& x_9, thread float* const a, thread float4* const tint_symbol_5) {
int b = 0;
float c = 0.0f;
b = 8;
float const x_71 = (*(tint_symbol_5)).y;
float const x_73 = x_9.x_GLF_uniform_float_values.arr[0].el;
if ((x_71 >= x_73)) {
int const x_77 = b;
b = (x_77 + 1);
int const x_79 = b;
b = (x_79 + 1);
}
float const x_81 = *(a);
float const x_83 = x_9.x_GLF_uniform_float_values.arr[1].el;
if ((x_81 < x_83)) {
float const x_88 = x_9.x_GLF_uniform_float_values.arr[1].el;
return x_88;
}
int const x_89 = b;
c = float(clamp(x_89, 0, 2));
float const x_92 = c;
return x_92;
}
void main_1(constant buf0& x_9, constant buf1& x_14, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
float a_1 = 0.0f;
float param = 0.0f;
float const x_43 = x_9.x_GLF_uniform_float_values.arr[1].el;
param = x_43;
float const x_44 = f1_f1_(x_9, &(param), tint_symbol_6);
a_1 = x_44;
float const x_45 = a_1;
float const x_47 = x_9.x_GLF_uniform_float_values.arr[2].el;
if ((x_45 == x_47)) {
int const x_53 = x_14.x_GLF_uniform_int_values.arr[1].el;
int const x_56 = x_14.x_GLF_uniform_int_values.arr[0].el;
int const x_59 = x_14.x_GLF_uniform_int_values.arr[0].el;
int const x_62 = x_14.x_GLF_uniform_int_values.arr[1].el;
*(tint_symbol_7) = float4(float(x_53), float(x_56), float(x_59), float(x_62));
} else {
int const x_66 = x_14.x_GLF_uniform_int_values.arr[0].el;
float const x_67 = float(x_66);
*(tint_symbol_7) = float4(x_67, x_67, x_67, x_67);
}
return;
}
fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]], constant buf1& x_14 [[buffer(1)]]) {
thread float4 tint_symbol_8 = 0.0f;
thread float4 tint_symbol_9 = 0.0f;
tint_symbol_8 = gl_FragCoord_param;
main_1(x_9, x_14, &(tint_symbol_8), &(tint_symbol_9));
main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
return tint_symbol_4;
}