dawn-cmake/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-replace-ext.../0-opt.wgsl.expected.msl

79 lines
1.7 KiB
Plaintext

#include <metal_stdlib>
using namespace metal;
struct S {
int x;
int y;
};
struct buf0 {
/* 0x0000 */ int one;
};
struct tint_array_wrapper {
S arr[2];
};
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol_1 {
float4 x_GLF_color_1 [[color(0)]];
};
void func_struct_S_i1_i11_(thread S* const arg) {
(*(arg)).y = 1;
return;
}
void main_1(constant buf0& x_10, thread float4* const tint_symbol_3) {
float a = 0.0f;
tint_array_wrapper b = {};
S param = {};
a = 5.0f;
while (true) {
int const x_43 = x_10.one;
b.arr[x_43].x = 1;
int const x_46 = b.arr[1].x;
if ((x_46 == 1)) {
int const x_51 = x_10.one;
if ((x_51 == 1)) {
break;
}
S const x_56 = b.arr[1];
param = x_56;
func_struct_S_i1_i11_(&(param));
S const x_58 = param;
b.arr[1] = x_58;
int const x_61 = b.arr[1].y;
a = float(x_61);
}
a = 0.0f;
{
if (false) {
} else {
break;
}
}
}
float const x_63 = a;
if ((x_63 == 5.0f)) {
*(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
*(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
}
return;
}
main_out tint_symbol_inner(constant buf0& x_10, thread float4* const tint_symbol_4) {
main_1(x_10, tint_symbol_4);
main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
return tint_symbol_2;
}
fragment tint_symbol_1 tint_symbol(constant buf0& x_10 [[buffer(0)]]) {
thread float4 tint_symbol_5 = 0.0f;
main_out const inner_result = tint_symbol_inner(x_10, &(tint_symbol_5));
tint_symbol_1 wrapper_result = {};
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}