dawn-cmake/test/vk-gl-cts/graphicsfuzz/spv-composites/1.spvasm.expected.msl

119 lines
7.3 KiB
Plaintext

#include <metal_stdlib>
using namespace metal;
int tint_unary_minus(const int v) {
return select(-v, v, v == -2147483648);
}
struct buf0 {
/* 0x0000 */ packed_float2 resolution;
};
struct tint_array_wrapper {
int arr[256];
};
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_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
tint_array_wrapper x_195 = {};
tint_array_wrapper x_196 = {};
tint_array_wrapper x_197 = {};
float2 x_208 = 0.0f;
int2 x_214 = 0;
float4 x_249 = 0.0f;
float4 x_251 = 0.0f;
int2 x_218_phi = 0;
float4 x_251_phi = 0.0f;
bool x_252_phi = false;
float4 x_254_phi = 0.0f;
float4 const x_198 = *(tint_symbol_7);
float2 const x_201 = x_6.resolution;
float2 const x_202 = (float2(x_198.x, x_198.y) / x_201);
int const x_204 = tint_unary_minus(82);
x_208 = float2(0.0f, float4(x_201, 15.0f, 15.0f).z);
int const x_209 = as_type<int>((as_type<uint>(120) - as_type<uint>(0)));
x_214 = int2(int((x_202.x * 256.0f)), int((x_202.y * 256.0f)));
switch(0u) {
default: {
x_218_phi = x_214;
while (true) {
bool x_235 = false;
bool x_236_phi = false;
int2 const x_218 = x_218_phi;
int const x_221 = x_218.y;
x_251_phi = float4(0.0f, 0.0f, 0.0f, 0.0f);
x_252_phi = false;
if ((x_221 != 256)) {
} else {
break;
}
int const x_225 = x_218.x;
tint_array_wrapper const tint_symbol_2 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
x_195 = tint_symbol_2;
int const x_227 = x_195.arr[x_221];
bool const x_229 = (x_225 < as_type<int>((as_type<uint>(x_227) + as_type<uint>(15))));
x_236_phi = x_229;
if (x_229) {
tint_array_wrapper const tint_symbol_3 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
x_196 = tint_symbol_3;
int const x_233 = x_196.arr[x_221];
x_235 = (x_225 > as_type<int>((as_type<uint>(x_233) - as_type<uint>(15))));
x_236_phi = x_235;
}
bool const x_236 = x_236_phi;
if (x_236) {
tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}};
x_197 = tint_symbol_4;
int const x_240 = x_197.arr[x_221];
int const x_244 = as_type<int>((as_type<uint>(91) + as_type<uint>(244)));
buf0 const tint_symbol_5 = {.resolution=x_208};
float const x_248 = ((tint_symbol_5.resolution.y - fabs(float(as_type<int>((as_type<uint>(x_225) - as_type<uint>(x_240)))))) * 0.06666667f);
x_249 = float4(x_248, x_248, x_248, 1.0f);
x_251_phi = x_249;
x_252_phi = true;
break;
}
int2 x_219_1 = x_218;
x_219_1.y = as_type<int>((as_type<uint>(x_221) + as_type<uint>(1)));
int2 const x_219 = x_219_1;
{
x_218_phi = x_219;
}
}
x_251 = x_251_phi;
bool const x_252 = x_252_phi;
x_254_phi = x_251;
if (x_252) {
break;
}
x_254_phi = float4(0.0f, 0.0f, 0.0f, 1.0f);
break;
}
}
float4 const x_254 = x_254_phi;
*(tint_symbol_8) = x_254;
return;
}
main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
*(tint_symbol_9) = gl_FragCoord_param;
main_1(x_6, tint_symbol_9, tint_symbol_10);
main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)};
return tint_symbol_6;
}
fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
thread float4 tint_symbol_11 = 0.0f;
thread float4 tint_symbol_12 = 0.0f;
main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12));
tint_symbol_1 wrapper_result = {};
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}