119 lines
3.1 KiB
Plaintext
119 lines
3.1 KiB
Plaintext
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
struct tint_padded_array_element {
|
|
/* 0x0000 */ int el;
|
|
/* 0x0004 */ int8_t tint_pad[12];
|
|
};
|
|
struct tint_array_wrapper {
|
|
/* 0x0000 */ tint_padded_array_element arr[2];
|
|
};
|
|
struct buf0 {
|
|
/* 0x0000 */ tint_array_wrapper x_GLF_uniform_int_values;
|
|
};
|
|
struct tint_padded_array_element_1 {
|
|
/* 0x0000 */ float el;
|
|
/* 0x0004 */ int8_t tint_pad_1[12];
|
|
};
|
|
struct tint_array_wrapper_1 {
|
|
/* 0x0000 */ tint_padded_array_element_1 arr[1];
|
|
};
|
|
struct buf1 {
|
|
/* 0x0000 */ tint_array_wrapper_1 x_GLF_uniform_float_values;
|
|
};
|
|
struct main_out {
|
|
float4 x_GLF_color_1;
|
|
};
|
|
struct tint_symbol_1 {
|
|
float4 x_GLF_color_1 [[color(0)]];
|
|
};
|
|
|
|
void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_3) {
|
|
float4 color = 0.0f;
|
|
int i = 0;
|
|
int j = 0;
|
|
int k = 0;
|
|
color = float4(1.0f, 1.0f, 1.0f, 1.0f);
|
|
int const x_37 = x_7.x_GLF_uniform_int_values.arr[0].el;
|
|
i = x_37;
|
|
while (true) {
|
|
int const x_42 = i;
|
|
int const x_44 = x_7.x_GLF_uniform_int_values.arr[1].el;
|
|
if ((x_42 < x_44)) {
|
|
} else {
|
|
break;
|
|
}
|
|
int const x_47 = i;
|
|
switch(x_47) {
|
|
case 2: {
|
|
int const x_83 = i;
|
|
float const x_85 = x_11.x_GLF_uniform_float_values.arr[0].el;
|
|
color[x_83] = x_85;
|
|
break;
|
|
}
|
|
case 1: {
|
|
int const x_52 = x_7.x_GLF_uniform_int_values.arr[0].el;
|
|
j = x_52;
|
|
while (true) {
|
|
int const x_57 = i;
|
|
int const x_58 = i;
|
|
if ((x_57 > x_58)) {
|
|
} else {
|
|
break;
|
|
}
|
|
int const x_62 = x_7.x_GLF_uniform_int_values.arr[0].el;
|
|
k = x_62;
|
|
while (true) {
|
|
int const x_67 = k;
|
|
int const x_68 = i;
|
|
if ((x_67 < x_68)) {
|
|
} else {
|
|
break;
|
|
}
|
|
int const x_71 = k;
|
|
float const x_73 = x_11.x_GLF_uniform_float_values.arr[0].el;
|
|
color[x_71] = x_73;
|
|
{
|
|
int const x_75 = k;
|
|
k = as_type<int>((as_type<uint>(x_75) + as_type<uint>(1)));
|
|
}
|
|
}
|
|
{
|
|
int const x_77 = j;
|
|
j = as_type<int>((as_type<uint>(x_77) + as_type<uint>(1)));
|
|
}
|
|
}
|
|
int const x_79 = i;
|
|
float const x_81 = x_11.x_GLF_uniform_float_values.arr[0].el;
|
|
color[x_79] = x_81;
|
|
break;
|
|
}
|
|
default: {
|
|
break;
|
|
}
|
|
}
|
|
{
|
|
int const x_87 = i;
|
|
i = as_type<int>((as_type<uint>(x_87) + as_type<uint>(1)));
|
|
}
|
|
}
|
|
float4 const x_89 = color;
|
|
*(tint_symbol_3) = x_89;
|
|
return;
|
|
}
|
|
|
|
main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_symbol_4) {
|
|
main_1(x_7, x_11, tint_symbol_4);
|
|
main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
|
|
return tint_symbol_2;
|
|
}
|
|
|
|
fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) {
|
|
thread float4 tint_symbol_5 = 0.0f;
|
|
main_out const inner_result = tint_symbol_inner(x_7, x_11, &(tint_symbol_5));
|
|
tint_symbol_1 wrapper_result = {};
|
|
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
|
|
return wrapper_result;
|
|
}
|
|
|