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