blob: 3a21958ea366d0dfe08d2e35347768866eacb2d1 [file] [log] [blame]
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +00001struct buf0 {
James Price3b671cb2022-03-28 14:31:22 +00002 one : i32,
James Price1a72a762022-03-21 16:09:17 +00003}
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +00004
Ben Clayton01e4b6f2022-01-19 22:46:57 +00005@group(0) @binding(0) var<uniform> x_8 : buf0;
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +00006
7var<private> x_GLF_color : vec4<f32>;
8
9fn main_1() {
James Price1a72a762022-03-21 16:09:17 +000010 var a : array<i32, 3u>;
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +000011 var b : i32;
12 var c : i32;
13 a[0] = 1;
14 a[1] = 2;
15 a[2] = 3;
16 b = 0;
17 let x_38 : i32 = x_8.one;
18 let x_40 : i32 = a[x_38];
19 c = x_40;
20 let x_41 : i32 = c;
21 if ((x_41 > 1)) {
22 x_GLF_color = vec4<f32>(0.0, 1.0, 1.0, 0.0);
23 let x_45 : i32 = b;
24 b = (x_45 + 1);
25 }
26 let x_47 : i32 = b;
27 let x_48 : i32 = (x_47 + 1);
28 b = x_48;
James Price1a72a762022-03-21 16:09:17 +000029 let x_50_save = clamp(x_48, 0, 2);
30 let x_51 : i32 = a[x_50_save];
31 a[x_50_save] = (x_51 + 1);
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +000032 let x_54 : i32 = a[2];
33 if ((x_54 == 4)) {
34 x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
35 } else {
36 x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
37 }
38 return;
39}
40
41struct main_out {
Ben Clayton01e4b6f2022-01-19 22:46:57 +000042 @location(0)
James Price3b671cb2022-03-28 14:31:22 +000043 x_GLF_color_1 : vec4<f32>,
James Price1a72a762022-03-21 16:09:17 +000044}
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +000045
dan sinclairb29892b2022-06-07 13:55:34 +000046@fragment
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +000047fn main() -> main_out {
48 main_1();
49 return main_out(x_GLF_color);
50}