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, 2u>;
|
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_7 : buf0;
|
2021-07-23 13:10:12 +00:00
|
|
|
|
2022-01-19 22:46:57 +00:00
|
|
|
@group(0) @binding(1) var<uniform> x_9 : buf1;
|
2021-07-23 13:10:12 +00:00
|
|
|
|
|
|
|
var<private> x_GLF_color : vec4<f32>;
|
|
|
|
|
|
|
|
fn f1_vf2_(v1 : ptr<function, vec2<f32>>) -> i32 {
|
|
|
|
var x_99 : bool;
|
|
|
|
var x_100_phi : bool;
|
|
|
|
let x_89 : f32 = (*(v1)).x;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_91 : f32 = x_7.x_GLF_uniform_float_values[0].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
let x_92 : bool = (x_89 == x_91);
|
|
|
|
x_100_phi = x_92;
|
|
|
|
if (x_92) {
|
|
|
|
let x_96 : f32 = (*(v1)).y;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_98 : f32 = x_7.x_GLF_uniform_float_values[1].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
x_99 = (x_96 == x_98);
|
|
|
|
x_100_phi = x_99;
|
|
|
|
}
|
|
|
|
let x_100 : bool = x_100_phi;
|
|
|
|
if (x_100) {
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_104 : i32 = x_9.x_GLF_uniform_int_values[1].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
return x_104;
|
|
|
|
}
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_106 : i32 = x_9.x_GLF_uniform_int_values[0].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
return x_106;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main_1() {
|
|
|
|
var m1 : mat2x2<f32>;
|
|
|
|
var m2 : mat2x2<f32>;
|
|
|
|
var v1_1 : vec2<f32>;
|
|
|
|
var a : i32;
|
|
|
|
var param : vec2<f32>;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_45 : f32 = x_7.x_GLF_uniform_float_values[0].el;
|
|
|
|
let x_47 : f32 = x_7.x_GLF_uniform_float_values[1].el;
|
|
|
|
let x_50 : f32 = x_7.x_GLF_uniform_float_values[1].el;
|
|
|
|
let x_52 : f32 = x_7.x_GLF_uniform_float_values[1].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
m1 = mat2x2<f32>(vec2<f32>(x_45, -(x_47)), vec2<f32>(x_50, sin(x_52)));
|
|
|
|
let x_57 : mat2x2<f32> = m1;
|
|
|
|
let x_58 : mat2x2<f32> = m1;
|
|
|
|
m2 = (x_57 * x_58);
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_61 : f32 = x_7.x_GLF_uniform_float_values[0].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
let x_63 : mat2x2<f32> = m2;
|
|
|
|
v1_1 = (vec2<f32>(x_61, x_61) * x_63);
|
|
|
|
let x_65 : vec2<f32> = v1_1;
|
|
|
|
param = x_65;
|
|
|
|
let x_66 : i32 = f1_vf2_(&(param));
|
|
|
|
a = x_66;
|
|
|
|
let x_67 : i32 = a;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_69 : i32 = x_9.x_GLF_uniform_int_values[1].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
if ((x_67 == x_69)) {
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_75 : f32 = x_7.x_GLF_uniform_float_values[0].el;
|
|
|
|
let x_77 : f32 = x_7.x_GLF_uniform_float_values[1].el;
|
|
|
|
let x_79 : f32 = x_7.x_GLF_uniform_float_values[1].el;
|
|
|
|
let x_81 : f32 = x_7.x_GLF_uniform_float_values[0].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
x_GLF_color = vec4<f32>(x_75, x_77, x_79, x_81);
|
|
|
|
} else {
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_84 : i32 = x_9.x_GLF_uniform_int_values[1].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
let x_85 : f32 = f32(x_84);
|
|
|
|
x_GLF_color = vec4<f32>(x_85, x_85, x_85, x_85);
|
|
|
|
}
|
|
|
|
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);
|
|
|
|
}
|