dawn-cmake/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-sel.../1.wgsl.expected.msl

114 lines
6.8 KiB
Plaintext

#include <metal_stdlib>
using namespace metal;
struct buf0 {
/* 0x0000 */ packed_float2 resolution;
};
struct tint_array_wrapper {
int arr[256];
};
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol_2 {
float4 x_GLF_color_1 [[color(0)]];
};
void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
tint_array_wrapper x_196 = {};
tint_array_wrapper x_197 = {};
tint_array_wrapper x_198 = {};
int2 x_210 = 0;
float4 x_251 = 0.0f;
float4 x_253 = 0.0f;
int2 x_214_phi = 0;
float4 x_253_phi = 0.0f;
bool x_254_phi = false;
float4 x_256_phi = 0.0f;
float4 const x_199 = *(tint_symbol_8);
float2 const x_202 = x_6.resolution;
float2 const x_203 = (float2(x_199.x, x_199.y) / x_202);
x_210 = int2(int((x_203.x * 256.0f)), int((x_203.y * 256.0f)));
switch(0u) {
default: {
x_214_phi = x_210;
while (true) {
int x_233 = 0;
int x_234 = 0;
int x_235_phi = 0;
bool x_241_phi = false;
int2 const x_214 = x_214_phi;
int const x_217 = x_214.y;
x_253_phi = float4(0.0f, 0.0f, 0.0f, 0.0f);
x_254_phi = false;
if ((x_217 != 256)) {
} else {
break;
}
int const x_221 = x_214.x;
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_196 = tint_symbol_4;
int const x_223 = x_196.arr[x_217];
bool const x_225 = (x_221 < as_type<int>((as_type<uint>(x_223) + as_type<uint>(15))));
if (x_225) {
tint_array_wrapper const tint_symbol_5 = {.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_5;
}
if (x_225) {
x_233 = x_197.arr[x_217];
x_235_phi = x_233;
} else {
x_234 = 0;
x_235_phi = x_234;
}
int const x_235 = x_235_phi;
bool const x_237 = (x_221 > as_type<int>((as_type<uint>(x_235) - as_type<uint>(15))));
if (x_225) {
x_241_phi = x_237;
} else {
x_241_phi = x_225;
}
bool const x_241 = x_241_phi;
if (x_241) {
tint_array_wrapper const tint_symbol_6 = {.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_198 = tint_symbol_6;
int const x_245 = x_198.arr[x_217];
float const x_250 = ((15.0f - fabs(float(as_type<int>((as_type<uint>(x_221) - as_type<uint>(x_245)))))) * 0.06666667f);
x_251 = float4(x_250, x_250, x_250, 1.0f);
x_253_phi = x_251;
x_254_phi = true;
break;
}
int2 x_215_1 = x_214;
x_215_1.y = as_type<int>((as_type<uint>(x_217) + as_type<uint>(1)));
int2 const x_215 = x_215_1;
{
x_214_phi = x_215;
}
}
x_253 = x_253_phi;
bool const x_254 = x_254_phi;
x_256_phi = x_253;
if (x_254) {
break;
}
x_256_phi = float4(0.0f, 0.0f, 0.0f, 1.0f);
break;
}
}
float4 const x_256 = x_256_phi;
*(tint_symbol_9) = x_256;
return;
}
fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
thread float4 tint_symbol_10 = 0.0f;
thread float4 tint_symbol_11 = 0.0f;
tint_symbol_10 = gl_FragCoord_param;
main_1(x_6, &(tint_symbol_10), &(tint_symbol_11));
main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_11};
tint_symbol_2 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
return tint_symbol_7;
}