dawn-cmake/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-c.../0-opt.wgsl

60 lines
1.3 KiB
WebGPU Shading Language
Raw Normal View History

type Arr = @stride(16) array<i32, 3>;
2021-07-23 13:10:12 +00:00
struct buf0 {
x_GLF_uniform_int_values : Arr;
};
@group(0) @binding(0) var<uniform> x_6 : buf0;
2021-07-23 13:10:12 +00:00
var<private> x_GLF_color : vec4<f32>;
fn main_1() {
var c : i32;
var i : i32;
let x_27 : i32 = x_6.x_GLF_uniform_int_values[2];
c = x_27;
let x_29 : i32 = x_6.x_GLF_uniform_int_values[2];
i = x_29;
loop {
let x_34 : i32 = i;
let x_36 : i32 = x_6.x_GLF_uniform_int_values[0];
if ((x_34 < x_36)) {
} else {
break;
}
let x_39 : i32 = i;
c = ~(x_39);
let x_41 : i32 = c;
c = clamp(x_41, 0, 3);
continuing {
let x_43 : i32 = i;
i = (x_43 + 1);
}
}
let x_46 : i32 = x_6.x_GLF_uniform_int_values[1];
let x_47 : f32 = f32(x_46);
x_GLF_color = vec4<f32>(x_47, x_47, x_47, x_47);
let x_49 : i32 = c;
let x_51 : i32 = x_6.x_GLF_uniform_int_values[1];
if ((x_49 == x_51)) {
let x_56 : i32 = x_6.x_GLF_uniform_int_values[2];
let x_59 : i32 = x_6.x_GLF_uniform_int_values[1];
let x_62 : i32 = x_6.x_GLF_uniform_int_values[1];
let x_65 : i32 = x_6.x_GLF_uniform_int_values[2];
x_GLF_color = vec4<f32>(f32(x_56), f32(x_59), f32(x_62), f32(x_65));
}
return;
}
struct main_out {
@location(0)
2021-07-23 13:10:12 +00:00
x_GLF_color_1 : vec4<f32>;
};
@stage(fragment)
2021-07-23 13:10:12 +00:00
fn main() -> main_out {
main_1();
return main_out(x_GLF_color);
}