blob: 7fa7c7af148b241146d2e1a9fa6f3e0230d160b5 [file] [log] [blame]
James Price1a72a762022-03-21 16:09:17 +00001struct strided_arr {
2 @size(16)
James Price3b671cb2022-03-28 14:31:22 +00003 el : f32,
James Price1a72a762022-03-21 16:09:17 +00004}
5
Ben Clayton9dc48bc2023-01-24 14:55:17 +00006alias Arr = array<strided_arr, 5u>;
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +00007
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +00008struct buf0 {
James Price3b671cb2022-03-28 14:31:22 +00009 x_GLF_uniform_float_values : Arr,
James Price1a72a762022-03-21 16:09:17 +000010}
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +000011
Ben Clayton01e4b6f2022-01-19 22:46:57 +000012@group(0) @binding(0) var<uniform> x_6 : buf0;
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +000013
14var<private> x_GLF_color : vec4<f32>;
15
16fn main_1() {
17 var a : f32;
18 var b : f32;
19 var x_51 : bool;
20 var x_52_phi : bool;
James Price1a72a762022-03-21 16:09:17 +000021 let x_28 : f32 = x_6.x_GLF_uniform_float_values[2].el;
22 let x_30 : f32 = x_6.x_GLF_uniform_float_values[3].el;
23 let x_32 : f32 = x_6.x_GLF_uniform_float_values[3].el;
24 let x_34 : f32 = x_6.x_GLF_uniform_float_values[2].el;
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +000025 a = select(x_28, x_30, (x_32 > x_34));
26 let x_37 : f32 = a;
27 b = cos(log(x_37));
28 let x_40 : f32 = b;
29 x_GLF_color = vec4<f32>(x_40, x_40, x_40, x_40);
30 let x_42 : f32 = b;
James Price1a72a762022-03-21 16:09:17 +000031 let x_44 : f32 = x_6.x_GLF_uniform_float_values[0].el;
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +000032 let x_45 : bool = (x_42 > x_44);
33 x_52_phi = x_45;
34 if (x_45) {
35 let x_48 : f32 = b;
James Price1a72a762022-03-21 16:09:17 +000036 let x_50 : f32 = x_6.x_GLF_uniform_float_values[1].el;
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +000037 x_51 = (x_48 < x_50);
38 x_52_phi = x_51;
39 }
40 let x_52 : bool = x_52_phi;
41 if (x_52) {
James Price1a72a762022-03-21 16:09:17 +000042 let x_56 : f32 = x_6.x_GLF_uniform_float_values[3].el;
43 let x_58 : f32 = x_6.x_GLF_uniform_float_values[4].el;
44 let x_60 : f32 = x_6.x_GLF_uniform_float_values[4].el;
45 let x_62 : f32 = x_6.x_GLF_uniform_float_values[3].el;
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +000046 x_GLF_color = vec4<f32>(x_56, x_58, x_60, x_62);
47 }
48 return;
49}
50
51struct main_out {
Ben Clayton01e4b6f2022-01-19 22:46:57 +000052 @location(0)
James Price3b671cb2022-03-28 14:31:22 +000053 x_GLF_color_1 : vec4<f32>,
James Price1a72a762022-03-21 16:09:17 +000054}
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +000055
dan sinclairb29892b2022-06-07 13:55:34 +000056@fragment
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +000057fn main() -> main_out {
58 main_1();
59 return main_out(x_GLF_color);
60}