dawn-cmake/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile.../0.spvasm.expected.msl

92 lines
6.3 KiB
Plaintext
Raw Normal View History

2021-07-23 13:10:12 +00:00
#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)]];
};
float4 trace_vi2_(thread int2* const pos) {
tint_array_wrapper indexable = {};
tint_array_wrapper indexable_1 = {};
float p = 0.0f;
tint_array_wrapper indexable_2 = {};
while (true) {
bool x_247 = false;
bool x_248_phi = false;
int const x_227 = (*(pos)).y;
if ((x_227 != 256)) {
} else {
break;
}
int const x_231 = (*(pos)).x;
int const x_233 = (*(pos)).y;
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}};
indexable = tint_symbol_4;
int const x_235 = indexable.arr[x_233];
bool const x_237 = (x_231 < as_type<int>((as_type<uint>(x_235) + as_type<uint>(15))));
2021-07-23 13:10:12 +00:00
x_248_phi = x_237;
if (x_237) {
int const x_241 = (*(pos)).x;
int const x_243 = (*(pos)).y;
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}};
indexable_1 = tint_symbol_5;
int const x_245 = indexable_1.arr[x_243];
x_247 = (x_241 > as_type<int>((as_type<uint>(x_245) - as_type<uint>(15))));
2021-07-23 13:10:12 +00:00
x_248_phi = x_247;
}
bool const x_248 = x_248_phi;
if (x_248) {
int const x_252 = (*(pos)).x;
int const x_254 = (*(pos)).y;
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}};
indexable_2 = tint_symbol_6;
int const x_256 = indexable_2.arr[x_254];
p = ((15.0f - fabs(float(as_type<int>((as_type<uint>(x_252) - as_type<uint>(x_256)))))) / 15.0f);
2021-07-23 13:10:12 +00:00
float const x_262 = p;
float const x_263 = p;
float const x_264 = p;
return float4(x_262, x_263, x_264, 1.0f);
}
int const x_267 = (*(pos)).y;
(*(pos)).y = as_type<int>((as_type<uint>(x_267) + as_type<uint>(1)));
2021-07-23 13:10:12 +00:00
}
return float4(0.0f, 0.0f, 0.0f, 1.0f);
}
void main_1(constant buf0& x_13, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
float2 pos_1 = 0.0f;
int2 ipos = 0;
int2 param = 0;
float4 const x_205 = *(tint_symbol_8);
float2 const x_208 = x_13.resolution;
pos_1 = (float2(x_205.x, x_205.y) / x_208);
float const x_211 = pos_1.x;
float const x_215 = pos_1.y;
ipos = int2(int((x_211 * 256.0f)), int((x_215 * 256.0f)));
int2 const x_219 = ipos;
param = x_219;
float4 const x_220 = trace_vi2_(&(param));
*(tint_symbol_9) = x_220;
return;
}
fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_13 [[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_13, &(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;
}