dawn-cmake/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-.../0-opt.wgsl.expected.msl

92 lines
3.2 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[5];
};
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 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_9, thread float4* const tint_symbol_4) {
float4 v = 0.0f;
int i = 0;
int const x_40 = x_6.x_GLF_uniform_int_values.arr[1].el;
int const x_43 = x_6.x_GLF_uniform_int_values.arr[2].el;
int const x_46 = x_6.x_GLF_uniform_int_values.arr[3].el;
int const x_49 = x_6.x_GLF_uniform_int_values.arr[0].el;
v = float4(float(x_40), float(x_43), float(x_46), float(x_49));
int const x_53 = x_6.x_GLF_uniform_int_values.arr[4].el;
i = x_53;
while (true) {
int const x_58 = i;
int const x_60 = x_6.x_GLF_uniform_int_values.arr[0].el;
if ((x_58 < x_60)) {
} else {
break;
}
float4 const x_63 = v;
float4 const x_64 = v;
float4 const x_65 = v;
float4 const x_66 = v;
int const x_88 = i;
float const x_92 = x_9.x_GLF_uniform_float_values.arr[0].el;
if ((float4x4(float4(x_63.x, x_63.y, x_63.z, x_63.w), float4(x_64.x, x_64.y, x_64.z, x_64.w), float4(x_65.x, x_65.y, x_65.z, x_65.w), float4(x_66.x, x_66.y, x_66.z, x_66.w))[0u][x_88] > x_92)) {
int const x_96 = i;
float4 const x_97 = v;
float const x_99 = x_9.x_GLF_uniform_float_values.arr[1].el;
float const x_102 = x_9.x_GLF_uniform_float_values.arr[0].el;
int const x_106 = x_6.x_GLF_uniform_int_values.arr[1].el;
v[x_96] = clamp(x_97, float4(x_99, x_99, x_99, x_99), float4(x_102, x_102, x_102, x_102))[x_106];
}
{
int const x_109 = i;
i = as_type<int>((as_type<uint>(x_109) + as_type<uint>(1)));
2021-07-23 13:10:12 +00:00
}
}
float4 const x_111 = v;
int const x_113 = x_6.x_GLF_uniform_int_values.arr[1].el;
float const x_114 = float(x_113);
if (all((x_111 == float4(x_114, x_114, x_114, x_114)))) {
int const x_122 = x_6.x_GLF_uniform_int_values.arr[1].el;
int const x_125 = x_6.x_GLF_uniform_int_values.arr[4].el;
int const x_128 = x_6.x_GLF_uniform_int_values.arr[4].el;
int const x_131 = x_6.x_GLF_uniform_int_values.arr[1].el;
*(tint_symbol_4) = float4(float(x_122), float(x_125), float(x_128), float(x_131));
} else {
int const x_135 = x_6.x_GLF_uniform_int_values.arr[4].el;
float const x_136 = float(x_135);
*(tint_symbol_4) = float4(x_136, x_136, x_136, x_136);
}
return;
}
fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
thread float4 tint_symbol_5 = 0.0f;
main_1(x_6, x_9, &(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;
}