dawn-cmake/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pr.../0-opt.wgsl.expected.msl

103 lines
3.0 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[1];
};
struct buf0 {
/* 0x0000 */ tint_array_wrapper_1 x_GLF_uniform_float_values;
};
struct tint_array_wrapper_2 {
int arr[10];
};
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol_2 {
float4 x_GLF_color_1 [[color(0)]];
};
int f1_(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbol_5) {
int i = 0;
tint_array_wrapper_2 A = {};
int a = 0;
int const x_56 = x_8.x_GLF_uniform_int_values.arr[2].el;
i = x_56;
while (true) {
int const x_61 = i;
int const x_63 = x_8.x_GLF_uniform_int_values.arr[0].el;
if ((x_61 < x_63)) {
} else {
break;
}
int const x_66 = i;
int const x_68 = x_8.x_GLF_uniform_int_values.arr[2].el;
A.arr[x_66] = x_68;
{
int const x_70 = i;
i = as_type<int>((as_type<uint>(x_70) + as_type<uint>(1)));
2021-07-23 13:10:12 +00:00
}
}
a = -1;
float const x_73 = (*(tint_symbol_5)).y;
float const x_75 = x_12.x_GLF_uniform_float_values.arr[0].el;
if ((x_73 >= x_75)) {
int const x_79 = a;
int const x_80 = as_type<int>((as_type<uint>(x_79) + as_type<uint>(1)));
2021-07-23 13:10:12 +00:00
a = x_80;
int const x_82 = x_8.x_GLF_uniform_int_values.arr[1].el;
A.arr[x_80] = x_82;
}
int const x_85 = x_8.x_GLF_uniform_int_values.arr[2].el;
int const x_87 = A.arr[x_85];
int const x_89 = x_8.x_GLF_uniform_int_values.arr[1].el;
if ((x_87 == x_89)) {
int const x_94 = a;
int const x_95 = as_type<int>((as_type<uint>(x_94) + as_type<uint>(1)));
2021-07-23 13:10:12 +00:00
a = x_95;
int const x_97 = A.arr[x_95];
return x_97;
} else {
int const x_99 = x_8.x_GLF_uniform_int_values.arr[1].el;
return x_99;
}
return 0;
}
void main_1(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
int i_1 = 0;
int const x_42 = f1_(x_8, x_12, tint_symbol_6);
i_1 = x_42;
int const x_44 = x_8.x_GLF_uniform_int_values.arr[1].el;
int const x_46 = i_1;
int const x_48 = i_1;
int const x_51 = x_8.x_GLF_uniform_int_values.arr[1].el;
*(tint_symbol_7) = float4(float(x_44), float(x_46), float(x_48), float(x_51));
return;
}
fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf1& x_8 [[buffer(1)]], constant buf0& x_12 [[buffer(0)]]) {
thread float4 tint_symbol_8 = 0.0f;
thread float4 tint_symbol_9 = 0.0f;
tint_symbol_8 = gl_FragCoord_param;
main_1(x_8, x_12, &(tint_symbol_8), &(tint_symbol_9));
main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
return tint_symbol_4;
}