2022-03-21 16:09:17 +00:00
|
|
|
struct strided_arr {
|
|
|
|
@size(16)
|
2022-03-28 14:31:22 +00:00
|
|
|
el : f32,
|
2022-03-21 16:09:17 +00:00
|
|
|
}
|
|
|
|
|
2023-01-24 14:55:17 +00:00
|
|
|
alias Arr = array<strided_arr, 2u>;
|
2021-07-23 13:10:12 +00:00
|
|
|
|
|
|
|
struct buf0 {
|
2022-03-28 14:31:22 +00:00
|
|
|
x_GLF_uniform_float_values : Arr,
|
2022-03-21 16:09:17 +00:00
|
|
|
}
|
2021-07-23 13:10:12 +00:00
|
|
|
|
2022-03-21 16:09:17 +00:00
|
|
|
struct strided_arr_1 {
|
|
|
|
@size(16)
|
2022-03-28 14:31:22 +00:00
|
|
|
el : i32,
|
2022-03-21 16:09:17 +00:00
|
|
|
}
|
|
|
|
|
2023-01-24 14:55:17 +00:00
|
|
|
alias Arr_1 = array<strided_arr_1, 4u>;
|
2021-07-23 13:10:12 +00:00
|
|
|
|
|
|
|
struct buf1 {
|
2022-03-28 14:31:22 +00:00
|
|
|
x_GLF_uniform_int_values : Arr_1,
|
2022-03-21 16:09:17 +00:00
|
|
|
}
|
2021-07-23 13:10:12 +00:00
|
|
|
|
2022-01-19 22:46:57 +00:00
|
|
|
@group(0) @binding(0) var<uniform> x_6 : buf0;
|
2021-07-23 13:10:12 +00:00
|
|
|
|
2022-01-19 22:46:57 +00:00
|
|
|
@group(0) @binding(1) var<uniform> x_10 : buf1;
|
2021-07-23 13:10:12 +00:00
|
|
|
|
|
|
|
var<private> x_GLF_color : vec4<f32>;
|
|
|
|
|
|
|
|
fn main_1() {
|
|
|
|
var a : u32;
|
|
|
|
var v1 : vec4<f32>;
|
2022-11-07 16:15:55 +00:00
|
|
|
var r : vec4<f32>;
|
2021-07-23 13:10:12 +00:00
|
|
|
var x_85 : bool;
|
|
|
|
var x_97 : bool;
|
|
|
|
var x_109 : bool;
|
|
|
|
var x_86_phi : bool;
|
|
|
|
var x_98_phi : bool;
|
|
|
|
var x_110_phi : bool;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_36 : f32 = x_6.x_GLF_uniform_float_values[0].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
a = pack4x8unorm(vec4<f32>(x_36, x_36, x_36, x_36));
|
|
|
|
let x_39 : u32 = a;
|
|
|
|
v1 = unpack4x8snorm(x_39);
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_42 : f32 = x_6.x_GLF_uniform_float_values[0].el;
|
|
|
|
let x_45 : f32 = x_6.x_GLF_uniform_float_values[1].el;
|
|
|
|
let x_48 : f32 = x_6.x_GLF_uniform_float_values[0].el;
|
|
|
|
let x_51 : f32 = x_6.x_GLF_uniform_float_values[1].el;
|
|
|
|
let x_54 : f32 = x_6.x_GLF_uniform_float_values[0].el;
|
|
|
|
let x_57 : f32 = x_6.x_GLF_uniform_float_values[1].el;
|
|
|
|
let x_60 : f32 = x_6.x_GLF_uniform_float_values[0].el;
|
|
|
|
let x_63 : f32 = x_6.x_GLF_uniform_float_values[1].el;
|
2022-11-07 16:15:55 +00:00
|
|
|
r = vec4<f32>((-(x_42) / x_45), (-(x_48) / x_51), (-(x_54) / x_57), (-(x_60) / x_63));
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_67 : i32 = x_10.x_GLF_uniform_int_values[1].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
let x_69 : f32 = v1[x_67];
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_71 : i32 = x_10.x_GLF_uniform_int_values[0].el;
|
2022-11-07 16:15:55 +00:00
|
|
|
let x_73 : f32 = r[x_71];
|
2021-07-23 13:10:12 +00:00
|
|
|
let x_74 : bool = (x_69 == x_73);
|
|
|
|
x_86_phi = x_74;
|
|
|
|
if (x_74) {
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_78 : i32 = x_10.x_GLF_uniform_int_values[3].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
let x_80 : f32 = v1[x_78];
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_82 : i32 = x_10.x_GLF_uniform_int_values[2].el;
|
2022-11-07 16:15:55 +00:00
|
|
|
let x_84 : f32 = r[x_82];
|
2021-07-23 13:10:12 +00:00
|
|
|
x_85 = (x_80 == x_84);
|
|
|
|
x_86_phi = x_85;
|
|
|
|
}
|
|
|
|
let x_86 : bool = x_86_phi;
|
|
|
|
x_98_phi = x_86;
|
|
|
|
if (x_86) {
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_90 : i32 = x_10.x_GLF_uniform_int_values[2].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
let x_92 : f32 = v1[x_90];
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_94 : i32 = x_10.x_GLF_uniform_int_values[3].el;
|
2022-11-07 16:15:55 +00:00
|
|
|
let x_96 : f32 = r[x_94];
|
2021-07-23 13:10:12 +00:00
|
|
|
x_97 = (x_92 == x_96);
|
|
|
|
x_98_phi = x_97;
|
|
|
|
}
|
|
|
|
let x_98 : bool = x_98_phi;
|
|
|
|
x_110_phi = x_98;
|
|
|
|
if (x_98) {
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_102 : i32 = x_10.x_GLF_uniform_int_values[0].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
let x_104 : f32 = v1[x_102];
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_106 : i32 = x_10.x_GLF_uniform_int_values[1].el;
|
2022-11-07 16:15:55 +00:00
|
|
|
let x_108 : f32 = r[x_106];
|
2021-07-23 13:10:12 +00:00
|
|
|
x_109 = (x_104 == x_108);
|
|
|
|
x_110_phi = x_109;
|
|
|
|
}
|
|
|
|
let x_110 : bool = x_110_phi;
|
|
|
|
if (x_110) {
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_115 : i32 = x_10.x_GLF_uniform_int_values[3].el;
|
|
|
|
let x_118 : i32 = x_10.x_GLF_uniform_int_values[1].el;
|
|
|
|
let x_121 : i32 = x_10.x_GLF_uniform_int_values[1].el;
|
|
|
|
let x_124 : i32 = x_10.x_GLF_uniform_int_values[3].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
x_GLF_color = vec4<f32>(f32(x_115), f32(x_118), f32(x_121), f32(x_124));
|
|
|
|
} else {
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_128 : i32 = x_10.x_GLF_uniform_int_values[1].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
let x_130 : f32 = v1[x_128];
|
|
|
|
x_GLF_color = vec4<f32>(x_130, x_130, x_130, x_130);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct main_out {
|
2022-01-19 22:46:57 +00:00
|
|
|
@location(0)
|
2022-03-28 14:31:22 +00:00
|
|
|
x_GLF_color_1 : vec4<f32>,
|
2022-03-21 16:09:17 +00:00
|
|
|
}
|
2021-07-23 13:10:12 +00:00
|
|
|
|
2022-06-07 13:55:34 +00:00
|
|
|
@fragment
|
2021-07-23 13:10:12 +00:00
|
|
|
fn main() -> main_out {
|
|
|
|
main_1();
|
|
|
|
return main_out(x_GLF_color);
|
|
|
|
}
|