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 267 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 75 225 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 60 "local" Name 62 "c" Name 73 "f" Name 75 "x" Name 129 "d" Name 155 "i" Name 174 "j" Name 225 "color" Name 231 "v" Name 232 "param" Name 234 "param" Name 236 "param" Name 244 "param" Name 246 "param" Name 248 "param" Decorate 60(local) RelaxedPrecision Decorate 62(c) RelaxedPrecision Decorate 73(f) RelaxedPrecision Decorate 75(x) RelaxedPrecision Decorate 129(d) RelaxedPrecision Decorate 155(i) RelaxedPrecision Decorate 174(j) RelaxedPrecision Decorate 225(color) RelaxedPrecision Decorate 231(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 48: 6(float) Constant 1065353216 49: 7(fvec4) ConstantComposite 48 48 48 48 61: TypePointer UniformConstant 9(int) 62(c): 61(ptr) Variable UniformConstant 65: 9(int) Constant 1 72: TypePointer Function 6(float) 74: TypePointer Input 6(float) 75(x): 74(ptr) Variable Input 129(d): 61(ptr) Variable UniformConstant 156: 9(int) Constant 0 162: 9(int) Constant 10 163: TypeBool 175: 9(int) Constant 20 181: 9(int) Constant 30 186: 6(float) Constant 1120429670 206: 6(float) Constant 1079739679 224: TypePointer Output 6(float) 225(color): 224(ptr) Variable Output 230: TypePointer UniformConstant 7(fvec4) 231(v): 230(ptr) Variable UniformConstant 239: TypeInt 32 0 240: 239(int) Constant 1 251: 239(int) Constant 2 4(main): 2 Function None 3 5: Label 60(local): 10(ptr) Variable Function 73(f): 72(ptr) Variable Function 155(i): 10(ptr) Variable Function 174(j): 10(ptr) Variable Function 232(param): 8(ptr) Variable Function 234(param): 8(ptr) Variable Function 236(param): 10(ptr) Variable Function 244(param): 8(ptr) Variable Function 246(param): 8(ptr) Variable Function 248(param): 10(ptr) Variable Function 63: 9(int) Load 62(c) Store 60(local) 63 64: 9(int) Load 60(local) 66: 9(int) IAdd 64 65 Store 60(local) 66 67: 9(int) Load 62(c) SelectionMerge 71 None Switch 67 70 case 1: 68 case 2: 69 70: Label 82: 6(float) Load 75(x) 83: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 82 Store 73(f) 83 Branch 71 68: Label 76: 6(float) Load 75(x) 77: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 76 Store 73(f) 77 Branch 71 69: Label 79: 6(float) Load 75(x) 80: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 79 Store 73(f) 80 Branch 71 71: Label 85: 9(int) Load 62(c) SelectionMerge 89 None Switch 85 88 case 1: 86 case 2: 87 88: Label 99: 6(float) Load 75(x) 100: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 99 101: 6(float) Load 73(f) 102: 6(float) FAdd 101 100 Store 73(f) 102 Branch 89 86: Label 90: 6(float) Load 75(x) 91: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 90 92: 6(float) Load 73(f) 93: 6(float) FAdd 92 91 Store 73(f) 93 Branch 87 87: Label 94: 6(float) Load 75(x) 95: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 94 96: 6(float) Load 73(f) 97: 6(float) FAdd 96 95 Store 73(f) 97 Branch 89 89: Label 104: 9(int) Load 62(c) SelectionMerge 107 None Switch 104 107 case 1: 105 case 2: 106 105: Label 108: 6(float) Load 75(x) 109: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 108 110: 6(float) Load 73(f) 111: 6(float) FAdd 110 109 Store 73(f) 111 Branch 107 106: Label 113: 6(float) Load 75(x) 114: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 113 115: 6(float) Load 73(f) 116: 6(float) FAdd 115 114 Store 73(f) 116 Branch 107 107: Label 119: 9(int) Load 62(c) SelectionMerge 123 None Switch 119 122 case 1: 120 case 2: 121 122: Label 150: 6(float) Load 75(x) 151: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 150 152: 6(float) Load 73(f) 153: 6(float) FAdd 152 151 Store 73(f) 153 Branch 123 120: Label 124: 6(float) Load 75(x) 125: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 124 126: 6(float) Load 73(f) 127: 6(float) FAdd 126 125 Store 73(f) 127 Branch 123 121: Label 130: 9(int) Load 129(d) SelectionMerge 133 None Switch 130 133 case 1: 131 case 2: 132 131: Label 134: 6(float) Load 75(x) 135: 6(float) Load 75(x) 136: 6(float) FMul 134 135 137: 6(float) Load 75(x) 138: 6(float) FMul 136 137 139: 6(float) Load 73(f) 140: 6(float) FAdd 139 138 Store 73(f) 140 Branch 133 132: Label 142: 6(float) Load 75(x) 143: 6(float) Load 75(x) 144: 6(float) FMul 142 143 145: 6(float) Load 73(f) 146: 6(float) FAdd 145 144 Store 73(f) 146 Branch 133 133: Label Branch 123 123: Label Store 155(i) 156 Branch 157 157: Label 161: 9(int) Load 155(i) 164: 163(bool) SLessThan 161 162 LoopMerge 159 160 None BranchConditional 164 158 159 158: Label 165: 9(int) Load 62(c) SelectionMerge 169 None Switch 165 168 case 1: 166 case 2: 167 168: Label 200: 6(float) Load 75(x) 201: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 200 202: 6(float) Load 73(f) 203: 6(float) FAdd 202 201 Store 73(f) 203 Branch 169 166: Label 170: 6(float) Load 75(x) 171: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 170 172: 6(float) Load 73(f) 173: 6(float) FAdd 172 171 Store 73(f) 173 Store 174(j) 175 Branch 176 176: Label 180: 9(int) Load 174(j) 182: 163(bool) SLessThan 180 181 LoopMerge 178 179 None BranchConditional 182 177 178 177: Label 183: 6(float) Load 73(f) 184: 6(float) FAdd 183 48 Store 73(f) 184 185: 6(float) Load 73(f) 187: 163(bool) FOrdLessThan 185 186 SelectionMerge 189 None BranchConditional 187 188 189 188: Label Branch 178 189: Label Branch 179 179: Label 191: 9(int) Load 174(j) 192: 9(int) IAdd 191 65 Store 174(j) 192 Branch 176 178: Label Branch 169 167: Label 194: 6(float) Load 75(x) 195: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 194 196: 6(float) Load 73(f) 197: 6(float) FAdd 196 195 Store 73(f) 197 Branch 169 169: Label 205: 6(float) Load 73(f) 207: 163(bool) FOrdLessThan 205 206 SelectionMerge 209 None BranchConditional 207 208 209 208: Label Branch 159 209: Label Branch 160 160: Label 211: 9(int) Load 155(i) 212: 9(int) IAdd 211 65 Store 155(i) 212 Branch 157 159: Label 213: 9(int) Load 62(c) SelectionMerge 216 None Switch 213 216 case 1: 214 case 2: 215 214: Label 217: 6(float) Load 75(x) 218: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 217 219: 6(float) Load 73(f) 220: 6(float) FAdd 219 218 Store 73(f) 220 Branch 216 215: Label Branch 216 216: Label 226: 6(float) Load 73(f) 227: 9(int) Load 60(local) 228: 6(float) ConvertSToF 227 229: 6(float) FAdd 226 228 Store 225(color) 229 233: 7(fvec4) Load 231(v) Store 232(param) 233 235: 7(fvec4) Load 231(v) Store 234(param) 235 237: 9(int) Load 62(c) Store 236(param) 237 238: 7(fvec4) FunctionCall 15(foo1(vf4;vf4;i1;) 232(param) 234(param) 236(param) 241: 6(float) CompositeExtract 238 1 242: 6(float) Load 225(color) 243: 6(float) FAdd 242 241 Store 225(color) 243 245: 7(fvec4) Load 231(v) Store 244(param) 245 247: 7(fvec4) Load 231(v) Store 246(param) 247 249: 9(int) Load 62(c) Store 248(param) 249 250: 7(fvec4) FunctionCall 20(foo2(vf4;vf4;i1;) 244(param) 246(param) 248(param) 252: 6(float) CompositeExtract 250 2 253: 6(float) Load 225(color) 254: 6(float) FAdd 253 252 Store 225(color) 254 255: 9(int) Load 62(c) SelectionMerge 258 None Switch 255 257 case 0: 256 257: Label Branch 258 256: Label Branch 258 258: Label 262: 9(int) Load 62(c) SelectionMerge 264 None Switch 262 263 263: Label Branch 264 264: 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 40: 9(int) Load 19(i1) SelectionMerge 45 None Switch 40 45 case 0: 41 case 2: 42 case 1: 43 case 3: 44 41: Label 46: 7(fvec4) Load 17(v1) ReturnValue 46 42: Label ReturnValue 49 43: Label 51: 7(fvec4) Load 18(v2) ReturnValue 51 44: Label 53: 7(fvec4) Load 17(v1) 54: 7(fvec4) Load 18(v2) 55: 7(fvec4) FMul 53 54 ReturnValue 55 45: Label ReturnValue 37 FunctionEnd