dawn-cmake/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ne.../0-opt.wgsl

90 lines
2.1 KiB
WebGPU Shading Language
Raw Permalink Normal View History

struct strided_arr {
@size(16)
el : i32,
}
type Arr = array<strided_arr, 5u>;
2021-07-23 13:10:12 +00:00
struct buf0 {
x_GLF_uniform_int_values : Arr,
}
2021-07-23 13:10:12 +00:00
@group(0) @binding(0) var<uniform> x_8 : buf0;
2021-07-23 13:10:12 +00:00
var<private> x_GLF_color : vec4<f32>;
fn func_f1_(f : ptr<function, f32>) -> i32 {
var a : i32;
var b : i32;
var i : i32;
let x_60 : i32 = x_8.x_GLF_uniform_int_values[1].el;
2021-07-23 13:10:12 +00:00
a = x_60;
let x_62 : i32 = x_8.x_GLF_uniform_int_values[2].el;
2021-07-23 13:10:12 +00:00
b = x_62;
let x_64 : i32 = x_8.x_GLF_uniform_int_values[2].el;
2021-07-23 13:10:12 +00:00
i = x_64;
loop {
let x_69 : i32 = i;
let x_71 : i32 = x_8.x_GLF_uniform_int_values[4].el;
2021-07-23 13:10:12 +00:00
if ((x_69 < x_71)) {
} else {
break;
}
let x_74 : i32 = a;
let x_76 : i32 = x_8.x_GLF_uniform_int_values[3].el;
2021-07-23 13:10:12 +00:00
if ((x_74 > x_76)) {
break;
}
let x_80 : f32 = *(f);
let x_84 : i32 = x_8.x_GLF_uniform_int_values[1].el;
2021-07-23 13:10:12 +00:00
let x_86 : i32 = i;
a = (((i32(x_80) - 1) - x_84) + x_86);
let x_88 : i32 = b;
b = (x_88 + 1);
continuing {
let x_90 : i32 = i;
i = (x_90 + 1);
}
}
let x_92 : i32 = b;
let x_94 : i32 = x_8.x_GLF_uniform_int_values[0].el;
2021-07-23 13:10:12 +00:00
if ((x_92 == x_94)) {
let x_100 : i32 = x_8.x_GLF_uniform_int_values[1].el;
2021-07-23 13:10:12 +00:00
return x_100;
} else {
let x_102 : i32 = x_8.x_GLF_uniform_int_values[2].el;
2021-07-23 13:10:12 +00:00
return x_102;
}
}
fn main_1() {
var param : f32;
param = 0.699999988;
let x_34 : i32 = func_f1_(&(param));
let x_36 : i32 = x_8.x_GLF_uniform_int_values[1].el;
2021-07-23 13:10:12 +00:00
if ((x_34 == x_36)) {
let x_42 : i32 = x_8.x_GLF_uniform_int_values[1].el;
let x_45 : i32 = x_8.x_GLF_uniform_int_values[2].el;
let x_48 : i32 = x_8.x_GLF_uniform_int_values[2].el;
let x_51 : i32 = x_8.x_GLF_uniform_int_values[1].el;
2021-07-23 13:10:12 +00:00
x_GLF_color = vec4<f32>(f32(x_42), f32(x_45), f32(x_48), f32(x_51));
} else {
let x_55 : i32 = x_8.x_GLF_uniform_int_values[2].el;
2021-07-23 13:10:12 +00:00
let x_56 : f32 = f32(x_55);
x_GLF_color = vec4<f32>(x_56, x_56, x_56, x_56);
}
return;
}
struct main_out {
@location(0)
x_GLF_color_1 : vec4<f32>,
}
2021-07-23 13:10:12 +00:00
@fragment
2021-07-23 13:10:12 +00:00
fn main() -> main_out {
main_1();
return main_out(x_GLF_color);
}