blob: 0d4308320e44b128801e9459006a902f5983ced7 [file] [log] [blame]
spv.switch.frag
Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
WARNING: 0:121: 'switch' : last case/default label not followed by statements
WARNING: 0:134: 'switch' : last case/default label not followed by statements
WARNING: 0:139: 'switch' : last case/default label not followed by statements
Linked fragment stage:
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 263
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 73 221
ExecutionMode 4 OriginLowerLeft
Source ESSL 310
Name 4 "main"
Name 15 "foo1(vf4;vf4;i1;"
Name 12 "v1"
Name 13 "v2"
Name 14 "i1"
Name 20 "foo2(vf4;vf4;i1;"
Name 17 "v1"
Name 18 "v2"
Name 19 "i1"
Name 58 "local"
Name 60 "c"
Name 71 "f"
Name 73 "x"
Name 127 "d"
Name 153 "i"
Name 171 "j"
Name 221 "color"
Name 227 "v"
Name 228 "param"
Name 230 "param"
Name 232 "param"
Name 240 "param"
Name 242 "param"
Name 244 "param"
Decorate 58(local) RelaxedPrecision
Decorate 60(c) RelaxedPrecision
Decorate 71(f) RelaxedPrecision
Decorate 73(x) RelaxedPrecision
Decorate 127(d) RelaxedPrecision
Decorate 153(i) RelaxedPrecision
Decorate 171(j) RelaxedPrecision
Decorate 221(color) RelaxedPrecision
Decorate 227(v) RelaxedPrecision
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8: TypePointer Function 7(fvec4)
9: TypeInt 32 1
10: TypePointer Function 9(int)
11: TypeFunction 7(fvec4) 8(ptr) 8(ptr) 10(ptr)
36: 6(float) Constant 0
37: 7(fvec4) ConstantComposite 36 36 36 36
47: 6(float) Constant 1065353216
48: 7(fvec4) ConstantComposite 47 47 47 47
59: TypePointer UniformConstant 9(int)
60(c): 59(ptr) Variable UniformConstant
63: 9(int) Constant 1
70: TypePointer Function 6(float)
72: TypePointer Input 6(float)
73(x): 72(ptr) Variable Input
127(d): 59(ptr) Variable UniformConstant
154: 9(int) Constant 0
159: 9(int) Constant 10
160: TypeBool
172: 9(int) Constant 20
177: 9(int) Constant 30
182: 6(float) Constant 1120429670
202: 6(float) Constant 1079739679
220: TypePointer Output 6(float)
221(color): 220(ptr) Variable Output
226: TypePointer UniformConstant 7(fvec4)
227(v): 226(ptr) Variable UniformConstant
235: TypeInt 32 0
236: 235(int) Constant 1
247: 235(int) Constant 2
4(main): 2 Function None 3
5: Label
58(local): 10(ptr) Variable Function
71(f): 70(ptr) Variable Function
153(i): 10(ptr) Variable Function
171(j): 10(ptr) Variable Function
228(param): 8(ptr) Variable Function
230(param): 8(ptr) Variable Function
232(param): 10(ptr) Variable Function
240(param): 8(ptr) Variable Function
242(param): 8(ptr) Variable Function
244(param): 10(ptr) Variable Function
61: 9(int) Load 60(c)
Store 58(local) 61
62: 9(int) Load 58(local)
64: 9(int) IAdd 62 63
Store 58(local) 64
65: 9(int) Load 60(c)
SelectionMerge 69 None
Switch 65 68
case 1: 66
case 2: 67
66: Label
74: 6(float) Load 73(x)
75: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 74
Store 71(f) 75
Branch 69
67: Label
77: 6(float) Load 73(x)
78: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 77
Store 71(f) 78
Branch 69
68: Label
80: 6(float) Load 73(x)
81: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 80
Store 71(f) 81
Branch 69
69: Label
83: 9(int) Load 60(c)
SelectionMerge 87 None
Switch 83 86
case 1: 84
case 2: 85
84: Label
88: 6(float) Load 73(x)
89: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 88
90: 6(float) Load 71(f)
91: 6(float) FAdd 90 89
Store 71(f) 91
Branch 85
85: Label
92: 6(float) Load 73(x)
93: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 92
94: 6(float) Load 71(f)
95: 6(float) FAdd 94 93
Store 71(f) 95
Branch 87
86: Label
97: 6(float) Load 73(x)
98: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 97
99: 6(float) Load 71(f)
100: 6(float) FAdd 99 98
Store 71(f) 100
Branch 87
87: Label
102: 9(int) Load 60(c)
SelectionMerge 105 None
Switch 102 105
case 1: 103
case 2: 104
103: Label
106: 6(float) Load 73(x)
107: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 106
108: 6(float) Load 71(f)
109: 6(float) FAdd 108 107
Store 71(f) 109
Branch 105
104: Label
111: 6(float) Load 73(x)
112: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 111
113: 6(float) Load 71(f)
114: 6(float) FAdd 113 112
Store 71(f) 114
Branch 105
105: Label
117: 9(int) Load 60(c)
SelectionMerge 121 None
Switch 117 120
case 1: 118
case 2: 119
118: Label
122: 6(float) Load 73(x)
123: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 122
124: 6(float) Load 71(f)
125: 6(float) FAdd 124 123
Store 71(f) 125
Branch 121
119: Label
128: 9(int) Load 127(d)
SelectionMerge 131 None
Switch 128 131
case 1: 129
case 2: 130
129: Label
132: 6(float) Load 73(x)
133: 6(float) Load 73(x)
134: 6(float) FMul 132 133
135: 6(float) Load 73(x)
136: 6(float) FMul 134 135
137: 6(float) Load 71(f)
138: 6(float) FAdd 137 136
Store 71(f) 138
Branch 131
130: Label
140: 6(float) Load 73(x)
141: 6(float) Load 73(x)
142: 6(float) FMul 140 141
143: 6(float) Load 71(f)
144: 6(float) FAdd 143 142
Store 71(f) 144
Branch 131
131: Label
Branch 121
120: Label
148: 6(float) Load 73(x)
149: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 148
150: 6(float) Load 71(f)
151: 6(float) FAdd 150 149
Store 71(f) 151
Branch 121
121: Label
Store 153(i) 154
Branch 155
155: Label
158: 9(int) Load 153(i)
161: 160(bool) SLessThan 158 159
LoopMerge 156 155 None
BranchConditional 161 157 156
157: Label
162: 9(int) Load 60(c)
SelectionMerge 166 None
Switch 162 165
case 1: 163
case 2: 164
163: Label
167: 6(float) Load 73(x)
168: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 167
169: 6(float) Load 71(f)
170: 6(float) FAdd 169 168
Store 71(f) 170
Store 171(j) 172
Branch 173
173: Label
176: 9(int) Load 171(j)
178: 160(bool) SLessThan 176 177
LoopMerge 174 173 None
BranchConditional 178 175 174
175: Label
179: 6(float) Load 71(f)
180: 6(float) FAdd 179 47
Store 71(f) 180
181: 6(float) Load 71(f)
183: 160(bool) FOrdLessThan 181 182
SelectionMerge 185 None
BranchConditional 183 184 185
184: Label
Branch 174
185: Label
187: 9(int) Load 171(j)
188: 9(int) IAdd 187 63
Store 171(j) 188
Branch 173
174: Label
Branch 166
164: Label
190: 6(float) Load 73(x)
191: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 190
192: 6(float) Load 71(f)
193: 6(float) FAdd 192 191
Store 71(f) 193
Branch 166
165: Label
196: 6(float) Load 73(x)
197: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 196
198: 6(float) Load 71(f)
199: 6(float) FAdd 198 197
Store 71(f) 199
Branch 166
166: Label
201: 6(float) Load 71(f)
203: 160(bool) FOrdLessThan 201 202
SelectionMerge 205 None
BranchConditional 203 204 205
204: Label
Branch 156
205: Label
207: 9(int) Load 153(i)
208: 9(int) IAdd 207 63
Store 153(i) 208
Branch 155
156: Label
209: 9(int) Load 60(c)
SelectionMerge 212 None
Switch 209 212
case 1: 210
case 2: 211
210: Label
213: 6(float) Load 73(x)
214: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 213
215: 6(float) Load 71(f)
216: 6(float) FAdd 215 214
Store 71(f) 216
Branch 212
211: Label
Branch 212
212: Label
222: 6(float) Load 71(f)
223: 9(int) Load 58(local)
224: 6(float) ConvertSToF 223
225: 6(float) FAdd 222 224
Store 221(color) 225
229: 7(fvec4) Load 227(v)
Store 228(param) 229
231: 7(fvec4) Load 227(v)
Store 230(param) 231
233: 9(int) Load 60(c)
Store 232(param) 233
234: 7(fvec4) FunctionCall 15(foo1(vf4;vf4;i1;) 228(param) 230(param) 232(param)
237: 6(float) CompositeExtract 234 1
238: 6(float) Load 221(color)
239: 6(float) FAdd 238 237
Store 221(color) 239
241: 7(fvec4) Load 227(v)
Store 240(param) 241
243: 7(fvec4) Load 227(v)
Store 242(param) 243
245: 9(int) Load 60(c)
Store 244(param) 245
246: 7(fvec4) FunctionCall 20(foo2(vf4;vf4;i1;) 240(param) 242(param) 244(param)
248: 6(float) CompositeExtract 246 2
249: 6(float) Load 221(color)
250: 6(float) FAdd 249 248
Store 221(color) 250
251: 9(int) Load 60(c)
SelectionMerge 254 None
Switch 251 253
case 0: 252
252: Label
Branch 254
253: Label
Branch 254
254: Label
258: 9(int) Load 60(c)
SelectionMerge 260 None
Switch 258 259
259: Label
Branch 260
260: Label
Return
FunctionEnd
15(foo1(vf4;vf4;i1;): 7(fvec4) Function None 11
12(v1): 8(ptr) FunctionParameter
13(v2): 8(ptr) FunctionParameter
14(i1): 10(ptr) FunctionParameter
16: Label
22: 9(int) Load 14(i1)
SelectionMerge 26 None
Switch 22 26
case 0: 23
case 2: 24
case 1: 24
case 3: 25
23: Label
27: 7(fvec4) Load 12(v1)
ReturnValue 27
24: Label
29: 7(fvec4) Load 13(v2)
ReturnValue 29
25: Label
31: 7(fvec4) Load 12(v1)
32: 7(fvec4) Load 13(v2)
33: 7(fvec4) FMul 31 32
ReturnValue 33
26: Label
ReturnValue 37
FunctionEnd
20(foo2(vf4;vf4;i1;): 7(fvec4) Function None 11
17(v1): 8(ptr) FunctionParameter
18(v2): 8(ptr) FunctionParameter
19(i1): 10(ptr) FunctionParameter
21: Label
39: 9(int) Load 19(i1)
SelectionMerge 44 None
Switch 39 44
case 0: 40
case 2: 41
case 1: 42
case 3: 43
40: Label
45: 7(fvec4) Load 17(v1)
ReturnValue 45
41: Label
ReturnValue 48
42: Label
50: 7(fvec4) Load 18(v2)
ReturnValue 50
43: Label
52: 7(fvec4) Load 17(v1)
53: 7(fvec4) Load 18(v2)
54: 7(fvec4) FMul 52 53
ReturnValue 54
44: Label
ReturnValue 37
FunctionEnd