dawn-cmake/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.spvasm.expected.msl

109 lines
4.1 KiB
Plaintext

#include <metal_stdlib>
using namespace metal;
struct buf0 {
/* 0x0000 */ packed_float2 resolution;
};
struct tint_array_wrapper {
float4 arr[8];
};
struct tint_array_wrapper_1 {
float4 arr[16];
};
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_9, thread float4* const tint_symbol_10) {
tint_array_wrapper x_77 = {};
tint_array_wrapper x_78 = {};
tint_array_wrapper x_79 = {};
tint_array_wrapper_1 x_80 = {};
float4 x_89 = 0.0f;
float4 x_89_phi = 0.0f;
int x_92_phi = 0;
float4 const x_81 = *(tint_symbol_9);
float2 const x_84 = x_6.resolution;
float2 const x_87 = floor(((float2(x_81.x, x_81.y) / x_84) * 32.0f));
x_89_phi = float4(0.5f, 0.5f, 1.0f, 1.0f);
x_92_phi = 0;
while (true) {
float4 x_136 = 0.0f;
int x_93 = 0;
bool x_121_phi = false;
float4 x_90_phi = 0.0f;
x_89 = x_89_phi;
int const x_92 = x_92_phi;
if ((x_92 < 8)) {
} else {
break;
}
float4 x_98 = 0.0f;
tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
x_77 = tint_symbol_4;
x_98 = x_77.arr[x_92];
switch(0u) {
default: {
float const x_101 = x_87.x;
float const x_102 = x_98.x;
if ((x_101 < x_102)) {
x_121_phi = false;
break;
}
float const x_106 = x_87.y;
float const x_107 = x_98.y;
if ((x_106 < x_107)) {
x_121_phi = false;
break;
}
if ((x_101 > (x_102 + x_98.z))) {
x_121_phi = false;
break;
}
if ((x_106 > (x_107 + x_98.w))) {
x_121_phi = false;
break;
}
x_121_phi = true;
break;
}
}
bool const x_121 = x_121_phi;
x_90_phi = x_89;
if (x_121) {
tint_array_wrapper const tint_symbol_5 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
x_78 = tint_symbol_5;
float const x_125 = x_78.arr[x_92].x;
tint_array_wrapper const tint_symbol_6 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
x_79 = tint_symbol_6;
float const x_128 = x_79.arr[x_92].y;
tint_array_wrapper_1 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
x_80 = tint_symbol_7;
x_136 = x_80.arr[((((int(x_125) * int(x_128)) + (x_92 * 9)) + 11) % 16)];
x_90_phi = x_136;
}
float4 const x_90 = x_90_phi;
{
x_93 = (x_92 + 1);
x_89_phi = x_90;
x_92_phi = x_93;
}
}
*(tint_symbol_10) = x_89;
return;
}
fragment tint_symbol_2 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;
tint_symbol_11 = gl_FragCoord_param;
main_1(x_6, &(tint_symbol_11), &(tint_symbol_12));
main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_12};
tint_symbol_2 const tint_symbol_8 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
return tint_symbol_8;
}