2021-07-23 13:10:12 +00:00
|
|
|
struct S {
|
2022-03-28 14:31:22 +00:00
|
|
|
data : i32,
|
2022-03-21 16:09:17 +00:00
|
|
|
}
|
2021-07-23 13:10:12 +00:00
|
|
|
|
|
|
|
struct buf1 {
|
2022-03-28 14:31:22 +00:00
|
|
|
v1 : vec2<f32>,
|
2022-03-21 16:09:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
struct strided_arr {
|
|
|
|
@size(16)
|
2022-03-28 14:31:22 +00:00
|
|
|
el : i32,
|
2022-03-21 16:09:17 +00:00
|
|
|
}
|
2021-07-23 13:10:12 +00:00
|
|
|
|
2022-03-21 16:09:17 +00:00
|
|
|
type Arr = array<strided_arr, 5u>;
|
2021-07-23 13:10:12 +00:00
|
|
|
|
|
|
|
struct buf0 {
|
2022-03-28 14:31:22 +00:00
|
|
|
x_GLF_uniform_int_values : Arr,
|
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(1) var<uniform> x_8 : buf1;
|
2021-07-23 13:10:12 +00:00
|
|
|
|
2022-01-19 22:46:57 +00:00
|
|
|
@group(0) @binding(0) var<uniform> x_10 : buf0;
|
2021-07-23 13:10:12 +00:00
|
|
|
|
|
|
|
var<private> x_GLF_color : vec4<f32>;
|
|
|
|
|
|
|
|
fn func_struct_S_i11_(s : ptr<function, S>) {
|
|
|
|
loop {
|
|
|
|
let x_174 : f32 = x_8.v1.x;
|
|
|
|
let x_176 : f32 = x_8.v1.y;
|
|
|
|
if ((x_174 > x_176)) {
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_180 : i32 = x_10.x_GLF_uniform_int_values[0].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
(*(s)).data = x_180;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main_1() {
|
|
|
|
var i : i32;
|
2022-03-21 16:09:17 +00:00
|
|
|
var arr : array<S, 3u>;
|
2021-07-23 13:10:12 +00:00
|
|
|
var i_1 : i32;
|
|
|
|
var param : S;
|
|
|
|
var j : i32;
|
|
|
|
var x_136 : bool;
|
|
|
|
var x_146 : bool;
|
|
|
|
var x_137_phi : bool;
|
|
|
|
var x_147_phi : bool;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_46 : i32 = x_10.x_GLF_uniform_int_values[2].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
i = x_46;
|
|
|
|
loop {
|
|
|
|
let x_51 : i32 = i;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_53 : i32 = x_10.x_GLF_uniform_int_values[1].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
if ((x_51 < x_53)) {
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
let x_56 : i32 = i;
|
|
|
|
let x_57 : i32 = i;
|
|
|
|
arr[x_56].data = x_57;
|
|
|
|
|
|
|
|
continuing {
|
|
|
|
let x_59 : i32 = i;
|
|
|
|
i = (x_59 + 1);
|
|
|
|
}
|
|
|
|
}
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_62 : i32 = x_10.x_GLF_uniform_int_values[2].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
i_1 = x_62;
|
|
|
|
loop {
|
|
|
|
let x_67 : i32 = i_1;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_69 : i32 = x_10.x_GLF_uniform_int_values[1].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
if ((x_67 < x_69)) {
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
let x_73 : f32 = x_8.v1.x;
|
|
|
|
let x_75 : f32 = x_8.v1.y;
|
|
|
|
if ((x_73 > x_75)) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
let x_79 : i32 = i_1;
|
|
|
|
let x_81 : i32 = arr[x_79].data;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_83 : i32 = x_10.x_GLF_uniform_int_values[0].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
if ((x_81 == x_83)) {
|
|
|
|
let x_88 : i32 = i_1;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_91 : i32 = x_10.x_GLF_uniform_int_values[3].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
arr[clamp(x_88, 0, 3)].data = x_91;
|
|
|
|
let x_94 : S = arr[2];
|
|
|
|
param = x_94;
|
|
|
|
func_struct_S_i11_(&(param));
|
|
|
|
let x_96 : S = param;
|
|
|
|
arr[2] = x_96;
|
|
|
|
} else {
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_99 : i32 = x_10.x_GLF_uniform_int_values[2].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
j = x_99;
|
|
|
|
loop {
|
|
|
|
let x_104 : i32 = j;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_106 : i32 = x_10.x_GLF_uniform_int_values[1].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
if ((x_104 < x_106)) {
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
let x_109 : i32 = j;
|
|
|
|
let x_111 : i32 = arr[x_109].data;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_113 : i32 = x_10.x_GLF_uniform_int_values[4].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
if ((x_111 > x_113)) {
|
|
|
|
discard;
|
|
|
|
}
|
|
|
|
|
|
|
|
continuing {
|
|
|
|
let x_117 : i32 = j;
|
|
|
|
j = (x_117 + 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
continuing {
|
|
|
|
let x_119 : i32 = i_1;
|
|
|
|
i_1 = (x_119 + 1);
|
|
|
|
}
|
|
|
|
}
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_122 : i32 = x_10.x_GLF_uniform_int_values[2].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
let x_124 : i32 = arr[x_122].data;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_126 : i32 = x_10.x_GLF_uniform_int_values[2].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
let x_127 : bool = (x_124 == x_126);
|
|
|
|
x_137_phi = x_127;
|
|
|
|
if (x_127) {
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_131 : i32 = x_10.x_GLF_uniform_int_values[0].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
let x_133 : i32 = arr[x_131].data;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_135 : i32 = x_10.x_GLF_uniform_int_values[3].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
x_136 = (x_133 == x_135);
|
|
|
|
x_137_phi = x_136;
|
|
|
|
}
|
|
|
|
let x_137 : bool = x_137_phi;
|
|
|
|
x_147_phi = x_137;
|
|
|
|
if (x_137) {
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_141 : i32 = x_10.x_GLF_uniform_int_values[3].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
let x_143 : i32 = arr[x_141].data;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_145 : i32 = x_10.x_GLF_uniform_int_values[0].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
x_146 = (x_143 == x_145);
|
|
|
|
x_147_phi = x_146;
|
|
|
|
}
|
|
|
|
let x_147 : bool = x_147_phi;
|
|
|
|
if (x_147) {
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_152 : i32 = x_10.x_GLF_uniform_int_values[0].el;
|
|
|
|
let x_155 : i32 = x_10.x_GLF_uniform_int_values[2].el;
|
|
|
|
let x_158 : i32 = x_10.x_GLF_uniform_int_values[2].el;
|
|
|
|
let x_161 : i32 = x_10.x_GLF_uniform_int_values[0].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
x_GLF_color = vec4<f32>(f32(x_152), f32(x_155), f32(x_158), f32(x_161));
|
|
|
|
} else {
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_165 : i32 = x_10.x_GLF_uniform_int_values[2].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
let x_166 : f32 = f32(x_165);
|
|
|
|
x_GLF_color = vec4<f32>(x_166, x_166, x_166, x_166);
|
|
|
|
}
|
|
|
|
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);
|
|
|
|
}
|