dawn-cmake/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix.../0-opt.wgsl.expected.msl

107 lines
3.6 KiB
Plaintext
Raw Normal View History

2021-07-23 13:10:12 +00:00
#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[3];
};
struct buf1 {
/* 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[2];
};
struct buf0 {
/* 0x0000 */ tint_array_wrapper_1 x_GLF_uniform_float_values;
};
struct tint_array_wrapper_2 {
int arr[2];
};
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol_1 {
float4 x_GLF_color_1 [[color(0)]];
};
void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_symbol_4) {
tint_array_wrapper_2 A = {};
int i = 0;
int a = 0;
float2 v1 = 0.0f;
float2 v2 = 0.0f;
int b = 0;
int const x_46 = x_6.x_GLF_uniform_int_values.arr[2].el;
int const x_48 = x_6.x_GLF_uniform_int_values.arr[0].el;
A.arr[x_46] = x_48;
int const x_51 = x_6.x_GLF_uniform_int_values.arr[0].el;
int const x_53 = x_6.x_GLF_uniform_int_values.arr[1].el;
A.arr[x_51] = x_53;
int const x_56 = x_6.x_GLF_uniform_int_values.arr[0].el;
i = x_56;
while (true) {
int const x_61 = i;
int const x_63 = x_6.x_GLF_uniform_int_values.arr[2].el;
if ((x_61 > x_63)) {
} else {
break;
}
int const x_66 = i;
i = (x_66 - 1);
2021-07-23 13:10:12 +00:00
}
float const x_69 = x_10.x_GLF_uniform_float_values.arr[1].el;
float const x_71 = x_10.x_GLF_uniform_float_values.arr[1].el;
int const x_73 = i;
int const x_76 = A.arr[select(x_73, 1, (x_69 >= x_71))];
a = x_76;
int const x_78 = x_6.x_GLF_uniform_int_values.arr[0].el;
int const x_80 = a;
int const x_84 = x_6.x_GLF_uniform_int_values.arr[0].el;
int const x_87 = x_6.x_GLF_uniform_int_values.arr[0].el;
float const x_91 = x_10.x_GLF_uniform_float_values.arr[1].el;
float const x_93 = x_10.x_GLF_uniform_float_values.arr[0].el;
v1 = select(float2(float(x_78), float(x_80)), float2(float(x_84), float(x_87)), bool2((x_91 < x_93), true));
int const x_98 = x_6.x_GLF_uniform_int_values.arr[2].el;
float const x_100 = v1[x_98];
int const x_103 = x_6.x_GLF_uniform_int_values.arr[0].el;
float const x_105 = v1[x_103];
v2 = select(float2(x_100, x_100), float2(x_105, x_105), bool2(false, false));
int const x_109 = x_6.x_GLF_uniform_int_values.arr[1].el;
float const x_110 = float(x_109);
int const x_113 = x_6.x_GLF_uniform_int_values.arr[0].el;
float const x_114 = float(x_113);
float2 const x_116 = v2;
int const x_121 = A.arr[int(clamp(float2(x_110, x_110), float2(x_114, x_114), x_116).x)];
b = x_121;
int const x_122 = b;
int const x_124 = x_6.x_GLF_uniform_int_values.arr[1].el;
if ((x_122 == x_124)) {
int const x_130 = x_6.x_GLF_uniform_int_values.arr[0].el;
int const x_133 = x_6.x_GLF_uniform_int_values.arr[2].el;
int const x_136 = x_6.x_GLF_uniform_int_values.arr[2].el;
int const x_139 = x_6.x_GLF_uniform_int_values.arr[0].el;
*(tint_symbol_4) = float4(float(x_130), float(x_133), float(x_136), float(x_139));
} else {
int const x_143 = x_6.x_GLF_uniform_int_values.arr[2].el;
float const x_144 = float(x_143);
*(tint_symbol_4) = float4(x_144, x_144, x_144, x_144);
}
return;
}
fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_10 [[buffer(0)]]) {
thread float4 tint_symbol_5 = 0.0f;
main_1(x_6, x_10, &(tint_symbol_5));
main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
return tint_symbol_3;
}