| 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 269 |
| |
| Capability Shader |
| 1: ExtInstImport "GLSL.std.450" |
| MemoryModel Logical GLSL450 |
| EntryPoint Fragment 4 "main" 75 227 |
| 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 175 "j" |
| Name 227 "color" |
| Name 233 "v" |
| Name 234 "param" |
| Name 236 "param" |
| Name 238 "param" |
| Name 246 "param" |
| Name 248 "param" |
| Name 250 "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 175(j) RelaxedPrecision |
| Decorate 227(color) RelaxedPrecision |
| Decorate 233(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 |
| 163: 9(int) Constant 10 |
| 164: TypeBool |
| 176: 9(int) Constant 20 |
| 183: 9(int) Constant 30 |
| 188: 6(float) Constant 1120429670 |
| 208: 6(float) Constant 1079739679 |
| 226: TypePointer Output 6(float) |
| 227(color): 226(ptr) Variable Output |
| 232: TypePointer UniformConstant 7(fvec4) |
| 233(v): 232(ptr) Variable UniformConstant |
| 241: TypeInt 32 0 |
| 242: 241(int) Constant 1 |
| 253: 241(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 |
| 175(j): 10(ptr) Variable Function |
| 234(param): 8(ptr) Variable Function |
| 236(param): 8(ptr) Variable Function |
| 238(param): 10(ptr) Variable Function |
| 246(param): 8(ptr) Variable Function |
| 248(param): 8(ptr) Variable Function |
| 250(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 |
| LoopMerge 159 160 None |
| Branch 161 |
| 161: Label |
| 162: 9(int) Load 155(i) |
| 165: 164(bool) SLessThan 162 163 |
| BranchConditional 165 158 159 |
| 158: Label |
| 166: 9(int) Load 62(c) |
| SelectionMerge 170 None |
| Switch 166 169 |
| case 1: 167 |
| case 2: 168 |
| 169: Label |
| 202: 6(float) Load 75(x) |
| 203: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 202 |
| 204: 6(float) Load 73(f) |
| 205: 6(float) FAdd 204 203 |
| Store 73(f) 205 |
| Branch 170 |
| 167: Label |
| 171: 6(float) Load 75(x) |
| 172: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 171 |
| 173: 6(float) Load 73(f) |
| 174: 6(float) FAdd 173 172 |
| Store 73(f) 174 |
| Store 175(j) 176 |
| Branch 177 |
| 177: Label |
| LoopMerge 179 180 None |
| Branch 181 |
| 181: Label |
| 182: 9(int) Load 175(j) |
| 184: 164(bool) SLessThan 182 183 |
| BranchConditional 184 178 179 |
| 178: Label |
| 185: 6(float) Load 73(f) |
| 186: 6(float) FAdd 185 48 |
| Store 73(f) 186 |
| 187: 6(float) Load 73(f) |
| 189: 164(bool) FOrdLessThan 187 188 |
| SelectionMerge 191 None |
| BranchConditional 189 190 191 |
| 190: Label |
| Branch 179 |
| 191: Label |
| Branch 180 |
| 180: Label |
| 193: 9(int) Load 175(j) |
| 194: 9(int) IAdd 193 65 |
| Store 175(j) 194 |
| Branch 177 |
| 179: Label |
| Branch 170 |
| 168: Label |
| 196: 6(float) Load 75(x) |
| 197: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 196 |
| 198: 6(float) Load 73(f) |
| 199: 6(float) FAdd 198 197 |
| Store 73(f) 199 |
| Branch 170 |
| 170: Label |
| 207: 6(float) Load 73(f) |
| 209: 164(bool) FOrdLessThan 207 208 |
| SelectionMerge 211 None |
| BranchConditional 209 210 211 |
| 210: Label |
| Branch 159 |
| 211: Label |
| Branch 160 |
| 160: Label |
| 213: 9(int) Load 155(i) |
| 214: 9(int) IAdd 213 65 |
| Store 155(i) 214 |
| Branch 157 |
| 159: Label |
| 215: 9(int) Load 62(c) |
| SelectionMerge 218 None |
| Switch 215 218 |
| case 1: 216 |
| case 2: 217 |
| 216: Label |
| 219: 6(float) Load 75(x) |
| 220: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 219 |
| 221: 6(float) Load 73(f) |
| 222: 6(float) FAdd 221 220 |
| Store 73(f) 222 |
| Branch 218 |
| 217: Label |
| Branch 218 |
| 218: Label |
| 228: 6(float) Load 73(f) |
| 229: 9(int) Load 60(local) |
| 230: 6(float) ConvertSToF 229 |
| 231: 6(float) FAdd 228 230 |
| Store 227(color) 231 |
| 235: 7(fvec4) Load 233(v) |
| Store 234(param) 235 |
| 237: 7(fvec4) Load 233(v) |
| Store 236(param) 237 |
| 239: 9(int) Load 62(c) |
| Store 238(param) 239 |
| 240: 7(fvec4) FunctionCall 15(foo1(vf4;vf4;i1;) 234(param) 236(param) 238(param) |
| 243: 6(float) CompositeExtract 240 1 |
| 244: 6(float) Load 227(color) |
| 245: 6(float) FAdd 244 243 |
| Store 227(color) 245 |
| 247: 7(fvec4) Load 233(v) |
| Store 246(param) 247 |
| 249: 7(fvec4) Load 233(v) |
| Store 248(param) 249 |
| 251: 9(int) Load 62(c) |
| Store 250(param) 251 |
| 252: 7(fvec4) FunctionCall 20(foo2(vf4;vf4;i1;) 246(param) 248(param) 250(param) |
| 254: 6(float) CompositeExtract 252 2 |
| 255: 6(float) Load 227(color) |
| 256: 6(float) FAdd 255 254 |
| Store 227(color) 256 |
| 257: 9(int) Load 62(c) |
| SelectionMerge 260 None |
| Switch 257 259 |
| case 0: 258 |
| 259: Label |
| Branch 260 |
| 258: Label |
| Branch 260 |
| 260: Label |
| 264: 9(int) Load 62(c) |
| SelectionMerge 266 None |
| Switch 264 265 |
| 265: Label |
| Branch 266 |
| 266: 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 |