dawn-cmake/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-p.../0-opt.spvasm.expected.wgsl

81 lines
1.9 KiB
WebGPU Shading Language

type Arr = [[stride(16)]] array<f32, 3>;
[[block]]
struct buf0 {
x_GLF_uniform_float_values : Arr;
};
type Arr_1 = [[stride(16)]] array<i32, 2>;
[[block]]
struct buf1 {
x_GLF_uniform_int_values : Arr_1;
};
var<private> gl_FragCoord : vec4<f32>;
[[group(0), binding(0)]] var<uniform> x_9 : buf0;
var<private> x_GLF_color : vec4<f32>;
[[group(0), binding(1)]] var<uniform> x_14 : buf1;
fn f1_f1_(a : ptr<function, f32>) -> f32 {
var b : i32;
var c : f32;
b = 8;
let x_71 : f32 = gl_FragCoord.y;
let x_73 : f32 = x_9.x_GLF_uniform_float_values[0];
if ((x_71 >= x_73)) {
let x_77 : i32 = b;
b = (x_77 + 1);
let x_79 : i32 = b;
b = (x_79 + 1);
}
let x_81 : f32 = *(a);
let x_83 : f32 = x_9.x_GLF_uniform_float_values[1];
if ((x_81 < x_83)) {
let x_88 : f32 = x_9.x_GLF_uniform_float_values[1];
return x_88;
}
let x_89 : i32 = b;
c = f32(clamp(x_89, 0, 2));
let x_92 : f32 = c;
return x_92;
}
fn main_1() {
var a_1 : f32;
var param : f32;
let x_43 : f32 = x_9.x_GLF_uniform_float_values[1];
param = x_43;
let x_44 : f32 = f1_f1_(&(param));
a_1 = x_44;
let x_45 : f32 = a_1;
let x_47 : f32 = x_9.x_GLF_uniform_float_values[2];
if ((x_45 == x_47)) {
let x_53 : i32 = x_14.x_GLF_uniform_int_values[1];
let x_56 : i32 = x_14.x_GLF_uniform_int_values[0];
let x_59 : i32 = x_14.x_GLF_uniform_int_values[0];
let x_62 : i32 = x_14.x_GLF_uniform_int_values[1];
x_GLF_color = vec4<f32>(f32(x_53), f32(x_56), f32(x_59), f32(x_62));
} else {
let x_66 : i32 = x_14.x_GLF_uniform_int_values[0];
let x_67 : f32 = f32(x_66);
x_GLF_color = vec4<f32>(x_67, x_67, x_67, x_67);
}
return;
}
struct main_out {
[[location(0)]]
x_GLF_color_1 : vec4<f32>;
};
[[stage(fragment)]]
fn main([[builtin(position)]] gl_FragCoord_param : vec4<f32>) -> main_out {
gl_FragCoord = gl_FragCoord_param;
main_1();
return main_out(x_GLF_color);
}