Update .out files with new loop SPIR-V.
[platform/upstream/glslang.git] / Test / baseResults / spv.switch.frag.out
1 spv.switch.frag
2 Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
3 WARNING: 0:121: 'switch' : last case/default label not followed by statements 
4 WARNING: 0:134: 'switch' : last case/default label not followed by statements 
5 WARNING: 0:139: 'switch' : last case/default label not followed by statements 
6
7
8 Linked fragment stage:
9
10
11 // Module Version 10000
12 // Generated by (magic number): 80001
13 // Id's are bound by 265
14
15                               Capability Shader
16                1:             ExtInstImport  "GLSL.std.450"
17                               MemoryModel Logical GLSL450
18                               EntryPoint Fragment 4  "main" 73 223
19                               ExecutionMode 4 OriginLowerLeft
20                               Source ESSL 310
21                               Name 4  "main"
22                               Name 15  "foo1(vf4;vf4;i1;"
23                               Name 12  "v1"
24                               Name 13  "v2"
25                               Name 14  "i1"
26                               Name 20  "foo2(vf4;vf4;i1;"
27                               Name 17  "v1"
28                               Name 18  "v2"
29                               Name 19  "i1"
30                               Name 58  "local"
31                               Name 60  "c"
32                               Name 71  "f"
33                               Name 73  "x"
34                               Name 127  "d"
35                               Name 153  "i"
36                               Name 172  "j"
37                               Name 223  "color"
38                               Name 229  "v"
39                               Name 230  "param"
40                               Name 232  "param"
41                               Name 234  "param"
42                               Name 242  "param"
43                               Name 244  "param"
44                               Name 246  "param"
45                               Decorate 58(local) RelaxedPrecision
46                               Decorate 60(c) RelaxedPrecision
47                               Decorate 71(f) RelaxedPrecision
48                               Decorate 73(x) RelaxedPrecision
49                               Decorate 127(d) RelaxedPrecision
50                               Decorate 153(i) RelaxedPrecision
51                               Decorate 172(j) RelaxedPrecision
52                               Decorate 223(color) RelaxedPrecision
53                               Decorate 229(v) RelaxedPrecision
54                2:             TypeVoid
55                3:             TypeFunction 2
56                6:             TypeFloat 32
57                7:             TypeVector 6(float) 4
58                8:             TypePointer Function 7(fvec4)
59                9:             TypeInt 32 1
60               10:             TypePointer Function 9(int)
61               11:             TypeFunction 7(fvec4) 8(ptr) 8(ptr) 10(ptr)
62               36:    6(float) Constant 0
63               37:    7(fvec4) ConstantComposite 36 36 36 36
64               47:    6(float) Constant 1065353216
65               48:    7(fvec4) ConstantComposite 47 47 47 47
66               59:             TypePointer UniformConstant 9(int)
67            60(c):     59(ptr) Variable UniformConstant
68               63:      9(int) Constant 1
69               70:             TypePointer Function 6(float)
70               72:             TypePointer Input 6(float)
71            73(x):     72(ptr) Variable Input
72           127(d):     59(ptr) Variable UniformConstant
73              154:      9(int) Constant 0
74              160:      9(int) Constant 10
75              161:             TypeBool
76              173:      9(int) Constant 20
77              179:      9(int) Constant 30
78              184:    6(float) Constant 1120429670
79              204:    6(float) Constant 1079739679
80              222:             TypePointer Output 6(float)
81       223(color):    222(ptr) Variable Output
82              228:             TypePointer UniformConstant 7(fvec4)
83           229(v):    228(ptr) Variable UniformConstant
84              237:             TypeInt 32 0
85              238:    237(int) Constant 1
86              249:    237(int) Constant 2
87          4(main):           2 Function None 3
88                5:             Label
89        58(local):     10(ptr) Variable Function
90            71(f):     70(ptr) Variable Function
91           153(i):     10(ptr) Variable Function
92           172(j):     10(ptr) Variable Function
93       230(param):      8(ptr) Variable Function
94       232(param):      8(ptr) Variable Function
95       234(param):     10(ptr) Variable Function
96       242(param):      8(ptr) Variable Function
97       244(param):      8(ptr) Variable Function
98       246(param):     10(ptr) Variable Function
99               61:      9(int) Load 60(c)
100                               Store 58(local) 61
101               62:      9(int) Load 58(local)
102               64:      9(int) IAdd 62 63
103                               Store 58(local) 64
104               65:      9(int) Load 60(c)
105                               SelectionMerge 69 None
106                               Switch 65 68 
107                                      case 1: 66
108                                      case 2: 67
109               66:               Label
110               74:    6(float)   Load 73(x)
111               75:    6(float)   ExtInst 1(GLSL.std.450) 13(Sin) 74
112                                 Store 71(f) 75
113                                 Branch 69
114               67:               Label
115               77:    6(float)   Load 73(x)
116               78:    6(float)   ExtInst 1(GLSL.std.450) 14(Cos) 77
117                                 Store 71(f) 78
118                                 Branch 69
119               68:               Label
120               80:    6(float)   Load 73(x)
121               81:    6(float)   ExtInst 1(GLSL.std.450) 15(Tan) 80
122                                 Store 71(f) 81
123                                 Branch 69
124               69:             Label
125               83:      9(int) Load 60(c)
126                               SelectionMerge 87 None
127                               Switch 83 86 
128                                      case 1: 84
129                                      case 2: 85
130               84:               Label
131               88:    6(float)   Load 73(x)
132               89:    6(float)   ExtInst 1(GLSL.std.450) 13(Sin) 88
133               90:    6(float)   Load 71(f)
134               91:    6(float)   FAdd 90 89
135                                 Store 71(f) 91
136                                 Branch 85
137               85:               Label
138               92:    6(float)   Load 73(x)
139               93:    6(float)   ExtInst 1(GLSL.std.450) 14(Cos) 92
140               94:    6(float)   Load 71(f)
141               95:    6(float)   FAdd 94 93
142                                 Store 71(f) 95
143                                 Branch 87
144               86:               Label
145               97:    6(float)   Load 73(x)
146               98:    6(float)   ExtInst 1(GLSL.std.450) 15(Tan) 97
147               99:    6(float)   Load 71(f)
148              100:    6(float)   FAdd 99 98
149                                 Store 71(f) 100
150                                 Branch 87
151               87:             Label
152              102:      9(int) Load 60(c)
153                               SelectionMerge 105 None
154                               Switch 102 105 
155                                      case 1: 103
156                                      case 2: 104
157              103:               Label
158              106:    6(float)   Load 73(x)
159              107:    6(float)   ExtInst 1(GLSL.std.450) 13(Sin) 106
160              108:    6(float)   Load 71(f)
161              109:    6(float)   FAdd 108 107
162                                 Store 71(f) 109
163                                 Branch 105
164              104:               Label
165              111:    6(float)   Load 73(x)
166              112:    6(float)   ExtInst 1(GLSL.std.450) 14(Cos) 111
167              113:    6(float)   Load 71(f)
168              114:    6(float)   FAdd 113 112
169                                 Store 71(f) 114
170                                 Branch 105
171              105:             Label
172              117:      9(int) Load 60(c)
173                               SelectionMerge 121 None
174                               Switch 117 120 
175                                      case 1: 118
176                                      case 2: 119
177              118:               Label
178              122:    6(float)   Load 73(x)
179              123:    6(float)   ExtInst 1(GLSL.std.450) 13(Sin) 122
180              124:    6(float)   Load 71(f)
181              125:    6(float)   FAdd 124 123
182                                 Store 71(f) 125
183                                 Branch 121
184              119:               Label
185              128:      9(int)   Load 127(d)
186                                 SelectionMerge 131 None
187                                 Switch 128 131 
188                                        case 1: 129
189                                        case 2: 130
190              129:                 Label
191              132:    6(float)     Load 73(x)
192              133:    6(float)     Load 73(x)
193              134:    6(float)     FMul 132 133
194              135:    6(float)     Load 73(x)
195              136:    6(float)     FMul 134 135
196              137:    6(float)     Load 71(f)
197              138:    6(float)     FAdd 137 136
198                                   Store 71(f) 138
199                                   Branch 131
200              130:                 Label
201              140:    6(float)     Load 73(x)
202              141:    6(float)     Load 73(x)
203              142:    6(float)     FMul 140 141
204              143:    6(float)     Load 71(f)
205              144:    6(float)     FAdd 143 142
206                                   Store 71(f) 144
207                                   Branch 131
208              131:               Label
209                                 Branch 121
210              120:               Label
211              148:    6(float)   Load 73(x)
212              149:    6(float)   ExtInst 1(GLSL.std.450) 15(Tan) 148
213              150:    6(float)   Load 71(f)
214              151:    6(float)   FAdd 150 149
215                                 Store 71(f) 151
216                                 Branch 121
217              121:             Label
218                               Store 153(i) 154
219                               Branch 158
220              155:             Label
221              163:      9(int) Load 60(c)
222                               SelectionMerge 167 None
223                               Switch 163 166 
224                                      case 1: 164
225                                      case 2: 165
226              156:               Label
227              211:      9(int)   Load 60(c)
228                                 SelectionMerge 214 None
229                                 Switch 211 214 
230                                        case 1: 212
231                                        case 2: 213
232              157:                 Label
233              209:      9(int)     Load 153(i)
234              210:      9(int)     IAdd 209 63
235                                   Store 153(i) 210
236                                   Branch 158
237              158:                 Label
238              159:      9(int)     Load 153(i)
239              162:   161(bool)     SLessThan 159 160
240                                   LoopMerge 156 157 None
241                                   BranchConditional 162 155 156
242              164:                   Label
243              168:    6(float)       Load 73(x)
244              169:    6(float)       ExtInst 1(GLSL.std.450) 13(Sin) 168
245              170:    6(float)       Load 71(f)
246              171:    6(float)       FAdd 170 169
247                                     Store 71(f) 171
248                                     Store 172(j) 173
249                                     Branch 177
250              174:                   Label
251              181:    6(float)       Load 71(f)
252              182:    6(float)       FAdd 181 47
253                                     Store 71(f) 182
254              183:    6(float)       Load 71(f)
255              185:   161(bool)       FOrdLessThan 183 184
256                                     SelectionMerge 187 None
257                                     BranchConditional 185 186 187
258              175:                     Label
259                                       Branch 167
260              176:                     Label
261              189:      9(int)         Load 172(j)
262              190:      9(int)         IAdd 189 63
263                                       Store 172(j) 190
264                                       Branch 177
265              177:                     Label
266              178:      9(int)         Load 172(j)
267              180:   161(bool)         SLessThan 178 179
268                                       LoopMerge 175 176 None
269                                       BranchConditional 180 174 175
270              186:                       Label
271                                         Branch 175
272              187:                       Label
273                                         Branch 176
274              165:                       Label
275              192:    6(float)           Load 73(x)
276              193:    6(float)           ExtInst 1(GLSL.std.450) 14(Cos) 192
277              194:    6(float)           Load 71(f)
278              195:    6(float)           FAdd 194 193
279                                         Store 71(f) 195
280                                         Branch 167
281              166:                       Label
282              198:    6(float)           Load 73(x)
283              199:    6(float)           ExtInst 1(GLSL.std.450) 15(Tan) 198
284              200:    6(float)           Load 71(f)
285              201:    6(float)           FAdd 200 199
286                                         Store 71(f) 201
287                                         Branch 167
288              167:                       Label
289              203:    6(float)           Load 71(f)
290              205:   161(bool)           FOrdLessThan 203 204
291                                         SelectionMerge 207 None
292                                         BranchConditional 205 206 207
293              206:                         Label
294                                           Branch 156
295              207:                       Label
296                                         Branch 157
297              212:                       Label
298              215:    6(float)           Load 73(x)
299              216:    6(float)           ExtInst 1(GLSL.std.450) 13(Sin) 215
300              217:    6(float)           Load 71(f)
301              218:    6(float)           FAdd 217 216
302                                         Store 71(f) 218
303                                         Branch 214
304              213:                       Label
305                                         Branch 214
306              214:                       Label
307              224:    6(float)           Load 71(f)
308              225:      9(int)           Load 58(local)
309              226:    6(float)           ConvertSToF 225
310              227:    6(float)           FAdd 224 226
311                                         Store 223(color) 227
312              231:    7(fvec4)           Load 229(v)
313                                         Store 230(param) 231
314              233:    7(fvec4)           Load 229(v)
315                                         Store 232(param) 233
316              235:      9(int)           Load 60(c)
317                                         Store 234(param) 235
318              236:    7(fvec4)           FunctionCall 15(foo1(vf4;vf4;i1;) 230(param) 232(param) 234(param)
319              239:    6(float)           CompositeExtract 236 1
320              240:    6(float)           Load 223(color)
321              241:    6(float)           FAdd 240 239
322                                         Store 223(color) 241
323              243:    7(fvec4)           Load 229(v)
324                                         Store 242(param) 243
325              245:    7(fvec4)           Load 229(v)
326                                         Store 244(param) 245
327              247:      9(int)           Load 60(c)
328                                         Store 246(param) 247
329              248:    7(fvec4)           FunctionCall 20(foo2(vf4;vf4;i1;) 242(param) 244(param) 246(param)
330              250:    6(float)           CompositeExtract 248 2
331              251:    6(float)           Load 223(color)
332              252:    6(float)           FAdd 251 250
333                                         Store 223(color) 252
334              253:      9(int)           Load 60(c)
335                                         SelectionMerge 256 None
336                                         Switch 253 255 
337                                                case 0: 254
338              254:                         Label
339                                           Branch 256
340              255:                         Label
341                                           Branch 256
342              256:                       Label
343              260:      9(int)           Load 60(c)
344                                         SelectionMerge 262 None
345                                         Switch 260 261
346              261:                         Label
347                                           Branch 262
348              262:                       Label
349                                         Return
350                                         FunctionEnd
351 15(foo1(vf4;vf4;i1;):    7(fvec4)           Function None 11
352           12(v1):      8(ptr)           FunctionParameter
353           13(v2):      8(ptr)           FunctionParameter
354           14(i1):     10(ptr)           FunctionParameter
355               16:                       Label
356               22:      9(int)           Load 14(i1)
357                                         SelectionMerge 26 None
358                                         Switch 22 26 
359                                                case 0: 23
360                                                case 2: 24
361                                                case 1: 24
362                                                case 3: 25
363               23:                         Label
364               27:    7(fvec4)             Load 12(v1)
365                                           ReturnValue 27
366               24:                         Label
367               29:    7(fvec4)             Load 13(v2)
368                                           ReturnValue 29
369               25:                         Label
370               31:    7(fvec4)             Load 12(v1)
371               32:    7(fvec4)             Load 13(v2)
372               33:    7(fvec4)             FMul 31 32
373                                           ReturnValue 33
374               26:                       Label
375                                         ReturnValue 37
376                                         FunctionEnd
377 20(foo2(vf4;vf4;i1;):    7(fvec4)           Function None 11
378           17(v1):      8(ptr)           FunctionParameter
379           18(v2):      8(ptr)           FunctionParameter
380           19(i1):     10(ptr)           FunctionParameter
381               21:                       Label
382               39:      9(int)           Load 19(i1)
383                                         SelectionMerge 44 None
384                                         Switch 39 44 
385                                                case 0: 40
386                                                case 2: 41
387                                                case 1: 42
388                                                case 3: 43
389               40:                         Label
390               45:    7(fvec4)             Load 17(v1)
391                                           ReturnValue 45
392               41:                         Label
393                                           ReturnValue 48
394               42:                         Label
395               50:    7(fvec4)             Load 18(v2)
396                                           ReturnValue 50
397               43:                         Label
398               52:    7(fvec4)             Load 17(v1)
399               53:    7(fvec4)             Load 18(v2)
400               54:    7(fvec4)             FMul 52 53
401                                           ReturnValue 54
402               44:                       Label
403                                         ReturnValue 37
404                                         FunctionEnd