John Kessenich | cc16fa0 | 2015-12-10 18:01:54 -0700 | [diff] [blame^] | 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 263 |
| 14 | |
| 15 | Capability Shader |
| 16 | 1: ExtInstImport "GLSL.std.450" |
| 17 | MemoryModel Logical GLSL450 |
| 18 | EntryPoint Fragment 4 "main" 73 221 |
| 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 171 "j" |
| 37 | Name 221 "color" |
| 38 | Name 227 "v" |
| 39 | Name 228 "param" |
| 40 | Name 230 "param" |
| 41 | Name 232 "param" |
| 42 | Name 240 "param" |
| 43 | Name 242 "param" |
| 44 | Name 244 "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 171(j) RelaxedPrecision |
| 52 | Decorate 221(color) RelaxedPrecision |
| 53 | Decorate 227(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 | 159: 9(int) Constant 10 |
| 75 | 160: TypeBool |
| 76 | 172: 9(int) Constant 20 |
| 77 | 177: 9(int) Constant 30 |
| 78 | 182: 6(float) Constant 1120429670 |
| 79 | 202: 6(float) Constant 1079739679 |
| 80 | 220: TypePointer Output 6(float) |
| 81 | 221(color): 220(ptr) Variable Output |
| 82 | 226: TypePointer UniformConstant 7(fvec4) |
| 83 | 227(v): 226(ptr) Variable UniformConstant |
| 84 | 235: TypeInt 32 0 |
| 85 | 236: 235(int) Constant 1 |
| 86 | 247: 235(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 | 171(j): 10(ptr) Variable Function |
| 93 | 228(param): 8(ptr) Variable Function |
| 94 | 230(param): 8(ptr) Variable Function |
| 95 | 232(param): 10(ptr) Variable Function |
| 96 | 240(param): 8(ptr) Variable Function |
| 97 | 242(param): 8(ptr) Variable Function |
| 98 | 244(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 155 |
| 220 | 155: Label |
| 221 | 158: 9(int) Load 153(i) |
| 222 | 161: 160(bool) SLessThan 158 159 |
| 223 | LoopMerge 156 155 None |
| 224 | BranchConditional 161 157 156 |
| 225 | 157: Label |
| 226 | 162: 9(int) Load 60(c) |
| 227 | SelectionMerge 166 None |
| 228 | Switch 162 165 |
| 229 | case 1: 163 |
| 230 | case 2: 164 |
| 231 | 163: Label |
| 232 | 167: 6(float) Load 73(x) |
| 233 | 168: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 167 |
| 234 | 169: 6(float) Load 71(f) |
| 235 | 170: 6(float) FAdd 169 168 |
| 236 | Store 71(f) 170 |
| 237 | Store 171(j) 172 |
| 238 | Branch 173 |
| 239 | 173: Label |
| 240 | 176: 9(int) Load 171(j) |
| 241 | 178: 160(bool) SLessThan 176 177 |
| 242 | LoopMerge 174 173 None |
| 243 | BranchConditional 178 175 174 |
| 244 | 175: Label |
| 245 | 179: 6(float) Load 71(f) |
| 246 | 180: 6(float) FAdd 179 47 |
| 247 | Store 71(f) 180 |
| 248 | 181: 6(float) Load 71(f) |
| 249 | 183: 160(bool) FOrdLessThan 181 182 |
| 250 | SelectionMerge 185 None |
| 251 | BranchConditional 183 184 185 |
| 252 | 184: Label |
| 253 | Branch 174 |
| 254 | 185: Label |
| 255 | 187: 9(int) Load 171(j) |
| 256 | 188: 9(int) IAdd 187 63 |
| 257 | Store 171(j) 188 |
| 258 | Branch 173 |
| 259 | 174: Label |
| 260 | Branch 166 |
| 261 | 164: Label |
| 262 | 190: 6(float) Load 73(x) |
| 263 | 191: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 190 |
| 264 | 192: 6(float) Load 71(f) |
| 265 | 193: 6(float) FAdd 192 191 |
| 266 | Store 71(f) 193 |
| 267 | Branch 166 |
| 268 | 165: Label |
| 269 | 196: 6(float) Load 73(x) |
| 270 | 197: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 196 |
| 271 | 198: 6(float) Load 71(f) |
| 272 | 199: 6(float) FAdd 198 197 |
| 273 | Store 71(f) 199 |
| 274 | Branch 166 |
| 275 | 166: Label |
| 276 | 201: 6(float) Load 71(f) |
| 277 | 203: 160(bool) FOrdLessThan 201 202 |
| 278 | SelectionMerge 205 None |
| 279 | BranchConditional 203 204 205 |
| 280 | 204: Label |
| 281 | Branch 156 |
| 282 | 205: Label |
| 283 | 207: 9(int) Load 153(i) |
| 284 | 208: 9(int) IAdd 207 63 |
| 285 | Store 153(i) 208 |
| 286 | Branch 155 |
| 287 | 156: Label |
| 288 | 209: 9(int) Load 60(c) |
| 289 | SelectionMerge 212 None |
| 290 | Switch 209 212 |
| 291 | case 1: 210 |
| 292 | case 2: 211 |
| 293 | 210: Label |
| 294 | 213: 6(float) Load 73(x) |
| 295 | 214: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 213 |
| 296 | 215: 6(float) Load 71(f) |
| 297 | 216: 6(float) FAdd 215 214 |
| 298 | Store 71(f) 216 |
| 299 | Branch 212 |
| 300 | 211: Label |
| 301 | Branch 212 |
| 302 | 212: Label |
| 303 | 222: 6(float) Load 71(f) |
| 304 | 223: 9(int) Load 58(local) |
| 305 | 224: 6(float) ConvertSToF 223 |
| 306 | 225: 6(float) FAdd 222 224 |
| 307 | Store 221(color) 225 |
| 308 | 229: 7(fvec4) Load 227(v) |
| 309 | Store 228(param) 229 |
| 310 | 231: 7(fvec4) Load 227(v) |
| 311 | Store 230(param) 231 |
| 312 | 233: 9(int) Load 60(c) |
| 313 | Store 232(param) 233 |
| 314 | 234: 7(fvec4) FunctionCall 15(foo1(vf4;vf4;i1;) 228(param) 230(param) 232(param) |
| 315 | 237: 6(float) CompositeExtract 234 1 |
| 316 | 238: 6(float) Load 221(color) |
| 317 | 239: 6(float) FAdd 238 237 |
| 318 | Store 221(color) 239 |
| 319 | 241: 7(fvec4) Load 227(v) |
| 320 | Store 240(param) 241 |
| 321 | 243: 7(fvec4) Load 227(v) |
| 322 | Store 242(param) 243 |
| 323 | 245: 9(int) Load 60(c) |
| 324 | Store 244(param) 245 |
| 325 | 246: 7(fvec4) FunctionCall 20(foo2(vf4;vf4;i1;) 240(param) 242(param) 244(param) |
| 326 | 248: 6(float) CompositeExtract 246 2 |
| 327 | 249: 6(float) Load 221(color) |
| 328 | 250: 6(float) FAdd 249 248 |
| 329 | Store 221(color) 250 |
| 330 | 251: 9(int) Load 60(c) |
| 331 | SelectionMerge 254 None |
| 332 | Switch 251 253 |
| 333 | case 0: 252 |
| 334 | 252: Label |
| 335 | Branch 254 |
| 336 | 253: Label |
| 337 | Branch 254 |
| 338 | 254: Label |
| 339 | 258: 9(int) Load 60(c) |
| 340 | SelectionMerge 260 None |
| 341 | Switch 258 259 |
| 342 | 259: Label |
| 343 | Branch 260 |
| 344 | 260: Label |
| 345 | Return |
| 346 | FunctionEnd |
| 347 | 15(foo1(vf4;vf4;i1;): 7(fvec4) Function None 11 |
| 348 | 12(v1): 8(ptr) FunctionParameter |
| 349 | 13(v2): 8(ptr) FunctionParameter |
| 350 | 14(i1): 10(ptr) FunctionParameter |
| 351 | 16: Label |
| 352 | 22: 9(int) Load 14(i1) |
| 353 | SelectionMerge 26 None |
| 354 | Switch 22 26 |
| 355 | case 0: 23 |
| 356 | case 2: 24 |
| 357 | case 1: 24 |
| 358 | case 3: 25 |
| 359 | 23: Label |
| 360 | 27: 7(fvec4) Load 12(v1) |
| 361 | ReturnValue 27 |
| 362 | 24: Label |
| 363 | 29: 7(fvec4) Load 13(v2) |
| 364 | ReturnValue 29 |
| 365 | 25: Label |
| 366 | 31: 7(fvec4) Load 12(v1) |
| 367 | 32: 7(fvec4) Load 13(v2) |
| 368 | 33: 7(fvec4) FMul 31 32 |
| 369 | ReturnValue 33 |
| 370 | 26: Label |
| 371 | ReturnValue 37 |
| 372 | FunctionEnd |
| 373 | 20(foo2(vf4;vf4;i1;): 7(fvec4) Function None 11 |
| 374 | 17(v1): 8(ptr) FunctionParameter |
| 375 | 18(v2): 8(ptr) FunctionParameter |
| 376 | 19(i1): 10(ptr) FunctionParameter |
| 377 | 21: Label |
| 378 | 39: 9(int) Load 19(i1) |
| 379 | SelectionMerge 44 None |
| 380 | Switch 39 44 |
| 381 | case 0: 40 |
| 382 | case 2: 41 |
| 383 | case 1: 42 |
| 384 | case 3: 43 |
| 385 | 40: Label |
| 386 | 45: 7(fvec4) Load 17(v1) |
| 387 | ReturnValue 45 |
| 388 | 41: Label |
| 389 | ReturnValue 48 |
| 390 | 42: Label |
| 391 | 50: 7(fvec4) Load 18(v2) |
| 392 | ReturnValue 50 |
| 393 | 43: Label |
| 394 | 52: 7(fvec4) Load 17(v1) |
| 395 | 53: 7(fvec4) Load 18(v2) |
| 396 | 54: 7(fvec4) FMul 52 53 |
| 397 | ReturnValue 54 |
| 398 | 44: Label |
| 399 | ReturnValue 37 |
| 400 | FunctionEnd |