1spv.switch.frag 2WARNING: 0:121: 'switch' : last case/default label not followed by statements 3WARNING: 0:134: 'switch' : last case/default label not followed by statements 4WARNING: 0:139: 'switch' : last case/default label not followed by statements 5 6// Module Version 10000 7// Generated by (magic number): 80008 8// Id's are bound by 269 9 10 Capability Shader 11 1: ExtInstImport "GLSL.std.450" 12 MemoryModel Logical GLSL450 13 EntryPoint Fragment 4 "main" 62 75 129 227 233 14 ExecutionMode 4 OriginUpperLeft 15 Source ESSL 310 16 Name 4 "main" 17 Name 15 "foo1(vf4;vf4;i1;" 18 Name 12 "v1" 19 Name 13 "v2" 20 Name 14 "i1" 21 Name 20 "foo2(vf4;vf4;i1;" 22 Name 17 "v1" 23 Name 18 "v2" 24 Name 19 "i1" 25 Name 60 "local" 26 Name 62 "c" 27 Name 73 "f" 28 Name 75 "x" 29 Name 129 "d" 30 Name 155 "i" 31 Name 175 "j" 32 Name 227 "color" 33 Name 233 "v" 34 Name 234 "param" 35 Name 236 "param" 36 Name 238 "param" 37 Name 246 "param" 38 Name 248 "param" 39 Name 250 "param" 40 Decorate 15(foo1(vf4;vf4;i1;) RelaxedPrecision 41 Decorate 12(v1) RelaxedPrecision 42 Decorate 13(v2) RelaxedPrecision 43 Decorate 14(i1) RelaxedPrecision 44 Decorate 20(foo2(vf4;vf4;i1;) RelaxedPrecision 45 Decorate 17(v1) RelaxedPrecision 46 Decorate 18(v2) RelaxedPrecision 47 Decorate 19(i1) RelaxedPrecision 48 Decorate 22 RelaxedPrecision 49 Decorate 27 RelaxedPrecision 50 Decorate 29 RelaxedPrecision 51 Decorate 31 RelaxedPrecision 52 Decorate 32 RelaxedPrecision 53 Decorate 33 RelaxedPrecision 54 Decorate 40 RelaxedPrecision 55 Decorate 46 RelaxedPrecision 56 Decorate 51 RelaxedPrecision 57 Decorate 53 RelaxedPrecision 58 Decorate 54 RelaxedPrecision 59 Decorate 55 RelaxedPrecision 60 Decorate 60(local) RelaxedPrecision 61 Decorate 62(c) RelaxedPrecision 62 Decorate 62(c) Flat 63 Decorate 63 RelaxedPrecision 64 Decorate 64 RelaxedPrecision 65 Decorate 66 RelaxedPrecision 66 Decorate 67 RelaxedPrecision 67 Decorate 73(f) RelaxedPrecision 68 Decorate 75(x) RelaxedPrecision 69 Decorate 76 RelaxedPrecision 70 Decorate 77 RelaxedPrecision 71 Decorate 79 RelaxedPrecision 72 Decorate 80 RelaxedPrecision 73 Decorate 82 RelaxedPrecision 74 Decorate 83 RelaxedPrecision 75 Decorate 85 RelaxedPrecision 76 Decorate 90 RelaxedPrecision 77 Decorate 91 RelaxedPrecision 78 Decorate 92 RelaxedPrecision 79 Decorate 93 RelaxedPrecision 80 Decorate 94 RelaxedPrecision 81 Decorate 95 RelaxedPrecision 82 Decorate 96 RelaxedPrecision 83 Decorate 97 RelaxedPrecision 84 Decorate 99 RelaxedPrecision 85 Decorate 100 RelaxedPrecision 86 Decorate 101 RelaxedPrecision 87 Decorate 102 RelaxedPrecision 88 Decorate 104 RelaxedPrecision 89 Decorate 108 RelaxedPrecision 90 Decorate 109 RelaxedPrecision 91 Decorate 110 RelaxedPrecision 92 Decorate 111 RelaxedPrecision 93 Decorate 113 RelaxedPrecision 94 Decorate 114 RelaxedPrecision 95 Decorate 115 RelaxedPrecision 96 Decorate 116 RelaxedPrecision 97 Decorate 119 RelaxedPrecision 98 Decorate 124 RelaxedPrecision 99 Decorate 125 RelaxedPrecision 100 Decorate 126 RelaxedPrecision 101 Decorate 127 RelaxedPrecision 102 Decorate 129(d) RelaxedPrecision 103 Decorate 129(d) Flat 104 Decorate 130 RelaxedPrecision 105 Decorate 134 RelaxedPrecision 106 Decorate 135 RelaxedPrecision 107 Decorate 136 RelaxedPrecision 108 Decorate 137 RelaxedPrecision 109 Decorate 138 RelaxedPrecision 110 Decorate 139 RelaxedPrecision 111 Decorate 140 RelaxedPrecision 112 Decorate 142 RelaxedPrecision 113 Decorate 143 RelaxedPrecision 114 Decorate 144 RelaxedPrecision 115 Decorate 145 RelaxedPrecision 116 Decorate 146 RelaxedPrecision 117 Decorate 150 RelaxedPrecision 118 Decorate 151 RelaxedPrecision 119 Decorate 152 RelaxedPrecision 120 Decorate 153 RelaxedPrecision 121 Decorate 155(i) RelaxedPrecision 122 Decorate 162 RelaxedPrecision 123 Decorate 166 RelaxedPrecision 124 Decorate 171 RelaxedPrecision 125 Decorate 172 RelaxedPrecision 126 Decorate 173 RelaxedPrecision 127 Decorate 174 RelaxedPrecision 128 Decorate 175(j) RelaxedPrecision 129 Decorate 182 RelaxedPrecision 130 Decorate 185 RelaxedPrecision 131 Decorate 186 RelaxedPrecision 132 Decorate 187 RelaxedPrecision 133 Decorate 193 RelaxedPrecision 134 Decorate 194 RelaxedPrecision 135 Decorate 196 RelaxedPrecision 136 Decorate 197 RelaxedPrecision 137 Decorate 198 RelaxedPrecision 138 Decorate 199 RelaxedPrecision 139 Decorate 202 RelaxedPrecision 140 Decorate 203 RelaxedPrecision 141 Decorate 204 RelaxedPrecision 142 Decorate 205 RelaxedPrecision 143 Decorate 207 RelaxedPrecision 144 Decorate 213 RelaxedPrecision 145 Decorate 214 RelaxedPrecision 146 Decorate 215 RelaxedPrecision 147 Decorate 219 RelaxedPrecision 148 Decorate 220 RelaxedPrecision 149 Decorate 221 RelaxedPrecision 150 Decorate 222 RelaxedPrecision 151 Decorate 227(color) RelaxedPrecision 152 Decorate 228 RelaxedPrecision 153 Decorate 229 RelaxedPrecision 154 Decorate 230 RelaxedPrecision 155 Decorate 231 RelaxedPrecision 156 Decorate 233(v) RelaxedPrecision 157 Decorate 235 RelaxedPrecision 158 Decorate 237 RelaxedPrecision 159 Decorate 239 RelaxedPrecision 160 Decorate 240 RelaxedPrecision 161 Decorate 243 RelaxedPrecision 162 Decorate 244 RelaxedPrecision 163 Decorate 245 RelaxedPrecision 164 Decorate 247 RelaxedPrecision 165 Decorate 249 RelaxedPrecision 166 Decorate 251 RelaxedPrecision 167 Decorate 252 RelaxedPrecision 168 Decorate 254 RelaxedPrecision 169 Decorate 255 RelaxedPrecision 170 Decorate 256 RelaxedPrecision 171 Decorate 257 RelaxedPrecision 172 Decorate 264 RelaxedPrecision 173 2: TypeVoid 174 3: TypeFunction 2 175 6: TypeFloat 32 176 7: TypeVector 6(float) 4 177 8: TypePointer Function 7(fvec4) 178 9: TypeInt 32 1 179 10: TypePointer Function 9(int) 180 11: TypeFunction 7(fvec4) 8(ptr) 8(ptr) 10(ptr) 181 36: 6(float) Constant 0 182 37: 7(fvec4) ConstantComposite 36 36 36 36 183 48: 6(float) Constant 1065353216 184 49: 7(fvec4) ConstantComposite 48 48 48 48 185 61: TypePointer Input 9(int) 186 62(c): 61(ptr) Variable Input 187 65: 9(int) Constant 1 188 72: TypePointer Function 6(float) 189 74: TypePointer Input 6(float) 190 75(x): 74(ptr) Variable Input 191 129(d): 61(ptr) Variable Input 192 156: 9(int) Constant 0 193 163: 9(int) Constant 10 194 164: TypeBool 195 176: 9(int) Constant 20 196 183: 9(int) Constant 30 197 188: 6(float) Constant 1120429670 198 208: 6(float) Constant 1079739679 199 226: TypePointer Output 6(float) 200 227(color): 226(ptr) Variable Output 201 232: TypePointer Input 7(fvec4) 202 233(v): 232(ptr) Variable Input 203 241: TypeInt 32 0 204 242: 241(int) Constant 1 205 253: 241(int) Constant 2 206 4(main): 2 Function None 3 207 5: Label 208 60(local): 10(ptr) Variable Function 209 73(f): 72(ptr) Variable Function 210 155(i): 10(ptr) Variable Function 211 175(j): 10(ptr) Variable Function 212 234(param): 8(ptr) Variable Function 213 236(param): 8(ptr) Variable Function 214 238(param): 10(ptr) Variable Function 215 246(param): 8(ptr) Variable Function 216 248(param): 8(ptr) Variable Function 217 250(param): 10(ptr) Variable Function 218 63: 9(int) Load 62(c) 219 Store 60(local) 63 220 64: 9(int) Load 60(local) 221 66: 9(int) IAdd 64 65 222 Store 60(local) 66 223 67: 9(int) Load 62(c) 224 SelectionMerge 71 None 225 Switch 67 70 226 case 1: 68 227 case 2: 69 228 70: Label 229 82: 6(float) Load 75(x) 230 83: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 82 231 Store 73(f) 83 232 Branch 71 233 68: Label 234 76: 6(float) Load 75(x) 235 77: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 76 236 Store 73(f) 77 237 Branch 71 238 69: Label 239 79: 6(float) Load 75(x) 240 80: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 79 241 Store 73(f) 80 242 Branch 71 243 71: Label 244 85: 9(int) Load 62(c) 245 SelectionMerge 89 None 246 Switch 85 88 247 case 1: 86 248 case 2: 87 249 88: Label 250 99: 6(float) Load 75(x) 251 100: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 99 252 101: 6(float) Load 73(f) 253 102: 6(float) FAdd 101 100 254 Store 73(f) 102 255 Branch 89 256 86: Label 257 90: 6(float) Load 75(x) 258 91: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 90 259 92: 6(float) Load 73(f) 260 93: 6(float) FAdd 92 91 261 Store 73(f) 93 262 Branch 87 263 87: Label 264 94: 6(float) Load 75(x) 265 95: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 94 266 96: 6(float) Load 73(f) 267 97: 6(float) FAdd 96 95 268 Store 73(f) 97 269 Branch 89 270 89: Label 271 104: 9(int) Load 62(c) 272 SelectionMerge 107 None 273 Switch 104 107 274 case 1: 105 275 case 2: 106 276 105: Label 277 108: 6(float) Load 75(x) 278 109: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 108 279 110: 6(float) Load 73(f) 280 111: 6(float) FAdd 110 109 281 Store 73(f) 111 282 Branch 107 283 106: Label 284 113: 6(float) Load 75(x) 285 114: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 113 286 115: 6(float) Load 73(f) 287 116: 6(float) FAdd 115 114 288 Store 73(f) 116 289 Branch 107 290 107: Label 291 119: 9(int) Load 62(c) 292 SelectionMerge 123 None 293 Switch 119 122 294 case 1: 120 295 case 2: 121 296 122: Label 297 150: 6(float) Load 75(x) 298 151: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 150 299 152: 6(float) Load 73(f) 300 153: 6(float) FAdd 152 151 301 Store 73(f) 153 302 Branch 123 303 120: Label 304 124: 6(float) Load 75(x) 305 125: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 124 306 126: 6(float) Load 73(f) 307 127: 6(float) FAdd 126 125 308 Store 73(f) 127 309 Branch 123 310 121: Label 311 130: 9(int) Load 129(d) 312 SelectionMerge 133 None 313 Switch 130 133 314 case 1: 131 315 case 2: 132 316 131: Label 317 134: 6(float) Load 75(x) 318 135: 6(float) Load 75(x) 319 136: 6(float) FMul 134 135 320 137: 6(float) Load 75(x) 321 138: 6(float) FMul 136 137 322 139: 6(float) Load 73(f) 323 140: 6(float) FAdd 139 138 324 Store 73(f) 140 325 Branch 133 326 132: Label 327 142: 6(float) Load 75(x) 328 143: 6(float) Load 75(x) 329 144: 6(float) FMul 142 143 330 145: 6(float) Load 73(f) 331 146: 6(float) FAdd 145 144 332 Store 73(f) 146 333 Branch 133 334 133: Label 335 Branch 123 336 123: Label 337 Store 155(i) 156 338 Branch 157 339 157: Label 340 LoopMerge 159 160 None 341 Branch 161 342 161: Label 343 162: 9(int) Load 155(i) 344 165: 164(bool) SLessThan 162 163 345 BranchConditional 165 158 159 346 158: Label 347 166: 9(int) Load 62(c) 348 SelectionMerge 170 None 349 Switch 166 169 350 case 1: 167 351 case 2: 168 352 169: Label 353 202: 6(float) Load 75(x) 354 203: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 202 355 204: 6(float) Load 73(f) 356 205: 6(float) FAdd 204 203 357 Store 73(f) 205 358 Branch 170 359 167: Label 360 171: 6(float) Load 75(x) 361 172: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 171 362 173: 6(float) Load 73(f) 363 174: 6(float) FAdd 173 172 364 Store 73(f) 174 365 Store 175(j) 176 366 Branch 177 367 177: Label 368 LoopMerge 179 180 None 369 Branch 181 370 181: Label 371 182: 9(int) Load 175(j) 372 184: 164(bool) SLessThan 182 183 373 BranchConditional 184 178 179 374 178: Label 375 185: 6(float) Load 73(f) 376 186: 6(float) FAdd 185 48 377 Store 73(f) 186 378 187: 6(float) Load 73(f) 379 189: 164(bool) FOrdLessThan 187 188 380 SelectionMerge 191 None 381 BranchConditional 189 190 191 382 190: Label 383 Branch 179 384 191: Label 385 Branch 180 386 180: Label 387 193: 9(int) Load 175(j) 388 194: 9(int) IAdd 193 65 389 Store 175(j) 194 390 Branch 177 391 179: Label 392 Branch 170 393 168: Label 394 196: 6(float) Load 75(x) 395 197: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 196 396 198: 6(float) Load 73(f) 397 199: 6(float) FAdd 198 197 398 Store 73(f) 199 399 Branch 170 400 170: Label 401 207: 6(float) Load 73(f) 402 209: 164(bool) FOrdLessThan 207 208 403 SelectionMerge 211 None 404 BranchConditional 209 210 211 405 210: Label 406 Branch 159 407 211: Label 408 Branch 160 409 160: Label 410 213: 9(int) Load 155(i) 411 214: 9(int) IAdd 213 65 412 Store 155(i) 214 413 Branch 157 414 159: Label 415 215: 9(int) Load 62(c) 416 SelectionMerge 218 None 417 Switch 215 218 418 case 1: 216 419 case 2: 217 420 216: Label 421 219: 6(float) Load 75(x) 422 220: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 219 423 221: 6(float) Load 73(f) 424 222: 6(float) FAdd 221 220 425 Store 73(f) 222 426 Branch 218 427 217: Label 428 Branch 218 429 218: Label 430 228: 6(float) Load 73(f) 431 229: 9(int) Load 60(local) 432 230: 6(float) ConvertSToF 229 433 231: 6(float) FAdd 228 230 434 Store 227(color) 231 435 235: 7(fvec4) Load 233(v) 436 Store 234(param) 235 437 237: 7(fvec4) Load 233(v) 438 Store 236(param) 237 439 239: 9(int) Load 62(c) 440 Store 238(param) 239 441 240: 7(fvec4) FunctionCall 15(foo1(vf4;vf4;i1;) 234(param) 236(param) 238(param) 442 243: 6(float) CompositeExtract 240 1 443 244: 6(float) Load 227(color) 444 245: 6(float) FAdd 244 243 445 Store 227(color) 245 446 247: 7(fvec4) Load 233(v) 447 Store 246(param) 247 448 249: 7(fvec4) Load 233(v) 449 Store 248(param) 249 450 251: 9(int) Load 62(c) 451 Store 250(param) 251 452 252: 7(fvec4) FunctionCall 20(foo2(vf4;vf4;i1;) 246(param) 248(param) 250(param) 453 254: 6(float) CompositeExtract 252 2 454 255: 6(float) Load 227(color) 455 256: 6(float) FAdd 255 254 456 Store 227(color) 256 457 257: 9(int) Load 62(c) 458 SelectionMerge 260 None 459 Switch 257 259 460 case 0: 258 461 259: Label 462 Branch 260 463 258: Label 464 Branch 260 465 260: Label 466 264: 9(int) Load 62(c) 467 SelectionMerge 266 None 468 Switch 264 265 469 265: Label 470 Branch 266 471 266: Label 472 Return 473 FunctionEnd 47415(foo1(vf4;vf4;i1;): 7(fvec4) Function None 11 475 12(v1): 8(ptr) FunctionParameter 476 13(v2): 8(ptr) FunctionParameter 477 14(i1): 10(ptr) FunctionParameter 478 16: Label 479 22: 9(int) Load 14(i1) 480 SelectionMerge 26 None 481 Switch 22 26 482 case 0: 23 483 case 2: 24 484 case 1: 24 485 case 3: 25 486 23: Label 487 27: 7(fvec4) Load 12(v1) 488 ReturnValue 27 489 24: Label 490 29: 7(fvec4) Load 13(v2) 491 ReturnValue 29 492 25: Label 493 31: 7(fvec4) Load 12(v1) 494 32: 7(fvec4) Load 13(v2) 495 33: 7(fvec4) FMul 31 32 496 ReturnValue 33 497 26: Label 498 ReturnValue 37 499 FunctionEnd 50020(foo2(vf4;vf4;i1;): 7(fvec4) Function None 11 501 17(v1): 8(ptr) FunctionParameter 502 18(v2): 8(ptr) FunctionParameter 503 19(i1): 10(ptr) FunctionParameter 504 21: Label 505 40: 9(int) Load 19(i1) 506 SelectionMerge 45 None 507 Switch 40 45 508 case 0: 41 509 case 2: 42 510 case 1: 43 511 case 3: 44 512 41: Label 513 46: 7(fvec4) Load 17(v1) 514 ReturnValue 46 515 42: Label 516 ReturnValue 49 517 43: Label 518 51: 7(fvec4) Load 18(v2) 519 ReturnValue 51 520 44: Label 521 53: 7(fvec4) Load 17(v1) 522 54: 7(fvec4) Load 18(v2) 523 55: 7(fvec4) FMul 53 54 524 ReturnValue 55 525 45: Label 526 ReturnValue 37 527 FunctionEnd 528