Debian Codegraph @

third_party/spirv-cross/reference/shaders-msl-no-opt/asm/frag/switch-block-case-fallthrough.asm.invalid.frag

raw
1 #include <metal_stdlib>
2 #include <simd/simd.h>
3
4 using namespace metal;
5
6 struct main0_out
7 {
8 float4 FragColor [[color(0)]];
9 };
10
11 struct main0_in
12 {
13 int vIndex [[user(locn0)]];
14 };
15
16 fragment main0_out main0(main0_in in [[stage_in]])
17 {
18 int i = 0;
19 main0_out out = {};
20 int j;
21 int _30;
22 int _31;
23 if (in.vIndex != 0 && in.vIndex != 1 && in.vIndex != 11 && in.vIndex != 2 && in.vIndex != 3 && in.vIndex != 4 && in.vIndex != 5)
24 {
25 _30 = 2;
26 }
27 if (in.vIndex == 1 || in.vIndex == 11)
28 {
29 _31 = 1;
30 }
31 switch (in.vIndex)
32 {
33 case 0:
34 {
35 _30 = 3;
36 }
37 default:
38 {
39 j = _30;
40 _31 = 0;
41 }
42 case 1:
43 case 11:
44 {
45 j = _31;
46 }
47 case 2:
48 {
49 break;
50 }
51 case 3:
52 {
53 if (in.vIndex > 3)
54 {
55 i = 0;
56 break;
57 }
58 else
59 {
60 break;
61 }
62 }
63 case 4:
64 {
65 }
66 case 5:
67 {
68 i = 0;
69 break;
70 }
71 }
72 out.FragColor = float4(float(i));
73 return out;
74 }
75