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
|
|
|
}
|
|
|
|
|
2023-01-24 14:55:17 +00:00
|
|
|
alias Arr = array<strided_arr, 12u>;
|
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(0) var<uniform> x_8 : buf0;
|
2021-07-23 13:10:12 +00:00
|
|
|
|
|
|
|
var<private> x_GLF_color : vec4<f32>;
|
|
|
|
|
|
|
|
fn f_i1_(a : ptr<function, i32>) -> i32 {
|
|
|
|
var i : i32;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_16 : i32 = x_8.x_GLF_uniform_int_values[0].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
i = x_16;
|
|
|
|
loop {
|
|
|
|
let x_17 : i32 = i;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_18 : i32 = x_8.x_GLF_uniform_int_values[6].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
if ((x_17 < x_18)) {
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
let x_19 : i32 = i;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_20 : i32 = x_8.x_GLF_uniform_int_values[2].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
if ((x_19 > x_20)) {
|
|
|
|
let x_21 : i32 = *(a);
|
|
|
|
return x_21;
|
|
|
|
}
|
|
|
|
|
|
|
|
continuing {
|
|
|
|
let x_22 : i32 = i;
|
|
|
|
i = (x_22 + 1);
|
|
|
|
}
|
|
|
|
}
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_24 : i32 = x_8.x_GLF_uniform_int_values[0].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
return x_24;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main_1() {
|
2022-11-07 16:15:55 +00:00
|
|
|
var r : array<i32, 10u>;
|
2021-07-23 13:10:12 +00:00
|
|
|
var i_1 : i32;
|
2022-03-21 16:09:17 +00:00
|
|
|
var a_1 : array<i32, 10u>;
|
2021-07-23 13:10:12 +00:00
|
|
|
var param : i32;
|
|
|
|
var param_1 : i32;
|
|
|
|
var i_2 : i32;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_25 : i32 = x_8.x_GLF_uniform_int_values[0].el;
|
|
|
|
let x_26 : i32 = x_8.x_GLF_uniform_int_values[1].el;
|
2022-11-07 16:15:55 +00:00
|
|
|
r[x_25] = x_26;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_27 : i32 = x_8.x_GLF_uniform_int_values[11].el;
|
|
|
|
let x_28 : i32 = x_8.x_GLF_uniform_int_values[2].el;
|
2022-11-07 16:15:55 +00:00
|
|
|
r[x_27] = x_28;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_29 : i32 = x_8.x_GLF_uniform_int_values[1].el;
|
|
|
|
let x_30 : i32 = x_8.x_GLF_uniform_int_values[3].el;
|
2022-11-07 16:15:55 +00:00
|
|
|
r[x_29] = x_30;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_31 : i32 = x_8.x_GLF_uniform_int_values[2].el;
|
|
|
|
let x_32 : i32 = x_8.x_GLF_uniform_int_values[4].el;
|
2022-11-07 16:15:55 +00:00
|
|
|
r[x_31] = x_32;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_33 : i32 = x_8.x_GLF_uniform_int_values[3].el;
|
|
|
|
let x_34 : i32 = x_8.x_GLF_uniform_int_values[5].el;
|
2022-11-07 16:15:55 +00:00
|
|
|
r[x_33] = x_34;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_35 : i32 = x_8.x_GLF_uniform_int_values[4].el;
|
|
|
|
let x_36 : i32 = x_8.x_GLF_uniform_int_values[6].el;
|
2022-11-07 16:15:55 +00:00
|
|
|
r[x_35] = x_36;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_37 : i32 = x_8.x_GLF_uniform_int_values[5].el;
|
|
|
|
let x_38 : i32 = x_8.x_GLF_uniform_int_values[7].el;
|
2022-11-07 16:15:55 +00:00
|
|
|
r[x_37] = x_38;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_39 : i32 = x_8.x_GLF_uniform_int_values[8].el;
|
|
|
|
let x_40 : i32 = x_8.x_GLF_uniform_int_values[8].el;
|
2022-11-07 16:15:55 +00:00
|
|
|
r[x_39] = x_40;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_41 : i32 = x_8.x_GLF_uniform_int_values[9].el;
|
|
|
|
let x_42 : i32 = x_8.x_GLF_uniform_int_values[9].el;
|
2022-11-07 16:15:55 +00:00
|
|
|
r[x_41] = x_42;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_43 : i32 = x_8.x_GLF_uniform_int_values[10].el;
|
|
|
|
let x_44 : i32 = x_8.x_GLF_uniform_int_values[10].el;
|
2022-11-07 16:15:55 +00:00
|
|
|
r[x_43] = x_44;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_45 : i32 = x_8.x_GLF_uniform_int_values[0].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
i_1 = x_45;
|
|
|
|
loop {
|
|
|
|
let x_46 : i32 = i_1;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_47 : i32 = x_8.x_GLF_uniform_int_values[6].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
if ((x_46 < x_47)) {
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
let x_48 : i32 = i_1;
|
|
|
|
let x_49 : i32 = i_1;
|
|
|
|
a_1[x_48] = x_49;
|
|
|
|
let x_50 : i32 = i_1;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_51 : i32 = x_8.x_GLF_uniform_int_values[6].el;
|
|
|
|
let x_52 : i32 = x_8.x_GLF_uniform_int_values[1].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
if ((x_50 < (x_51 / x_52))) {
|
|
|
|
let x_54 : i32 = i_1;
|
|
|
|
let x_55 : i32 = i_1;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_56 : i32 = x_8.x_GLF_uniform_int_values[1].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
a_1[x_54] = (x_55 + x_56);
|
|
|
|
let x_58 : i32 = i_1;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_59 : i32 = x_8.x_GLF_uniform_int_values[6].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
if ((x_58 < x_59)) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
let x_60 : i32 = i_1;
|
|
|
|
let x_61 : i32 = i_1;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_62 : i32 = x_8.x_GLF_uniform_int_values[8].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
a_1[x_60] = (x_61 + x_62);
|
|
|
|
let x_64 : i32 = i_1;
|
|
|
|
let x_65 : i32 = a_1[x_64];
|
|
|
|
param = x_65;
|
|
|
|
let x_66 : i32 = f_i1_(&(param));
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_67 : i32 = x_8.x_GLF_uniform_int_values[8].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
if ((x_66 < x_67)) {
|
|
|
|
let x_68 : i32 = i_1;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_182_save = x_68;
|
|
|
|
let x_69 : i32 = a_1[x_182_save];
|
|
|
|
a_1[x_182_save] = (x_69 - 1);
|
2021-07-23 13:10:12 +00:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
let x_71 : i32 = i_1;
|
|
|
|
let x_72 : i32 = a_1[x_71];
|
|
|
|
param_1 = x_72;
|
|
|
|
let x_73 : i32 = f_i1_(&(param_1));
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_74 : i32 = x_8.x_GLF_uniform_int_values[8].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
if ((x_73 < x_74)) {
|
|
|
|
let x_75 : i32 = i_1;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_76 : i32 = x_8.x_GLF_uniform_int_values[4].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
let x_77 : i32 = a_1[x_75];
|
|
|
|
a_1[x_75] = (x_77 + x_76);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
continuing {
|
|
|
|
let x_79 : i32 = i_1;
|
|
|
|
i_1 = (x_79 + 1);
|
|
|
|
}
|
|
|
|
}
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_81 : i32 = x_8.x_GLF_uniform_int_values[0].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
i_2 = x_81;
|
|
|
|
loop {
|
|
|
|
let x_82 : i32 = i_2;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_83 : i32 = x_8.x_GLF_uniform_int_values[6].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
if ((x_82 < x_83)) {
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
let x_84 : i32 = i_2;
|
|
|
|
let x_85 : i32 = a_1[x_84];
|
|
|
|
let x_86 : i32 = i_2;
|
2022-11-07 16:15:55 +00:00
|
|
|
let x_87 : i32 = r[x_86];
|
2021-07-23 13:10:12 +00:00
|
|
|
if ((x_85 != x_87)) {
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_88 : i32 = x_8.x_GLF_uniform_int_values[0].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
let x_205 : f32 = f32(x_88);
|
|
|
|
x_GLF_color = vec4<f32>(x_205, x_205, x_205, x_205);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
continuing {
|
|
|
|
let x_89 : i32 = i_2;
|
|
|
|
i_2 = (x_89 + 1);
|
|
|
|
}
|
|
|
|
}
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_91 : i32 = x_8.x_GLF_uniform_int_values[11].el;
|
|
|
|
let x_92 : i32 = x_8.x_GLF_uniform_int_values[0].el;
|
|
|
|
let x_93 : i32 = x_8.x_GLF_uniform_int_values[0].el;
|
|
|
|
let x_94 : i32 = x_8.x_GLF_uniform_int_values[11].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
x_GLF_color = vec4<f32>(f32(x_91), f32(x_92), f32(x_93), f32(x_94));
|
|
|
|
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);
|
|
|
|
}
|