spv.debuginfo.implicit_br.glsl.frag // Module Version 10000 // Generated by (magic number): 8000b // Id's are bound by 204 Capability Shader Extension "SPV_KHR_non_semantic_info" 1: ExtInstImport "NonSemantic.Shader.DebugInfo.100" 3: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 14 "main" 54 ExecutionMode 14 OriginUpperLeft 2: String "spv.debuginfo.implicit_br.glsl.frag" 8: String "uint" 18: String "test_if" 21: String "#version 460 out int outx; int counter = 0; void test_if() { if (false) { counter += 1; } } void test_ifelse() { if (false) { counter += 1; } else { counter += 2; } } void test_if_compound() { if (false) { if (false) { counter += 1; } } } void test_if_compound2() { if (false) { if (false) { counter += 1; } counter += 2; } } void test_switch() { switch (0) { case 0: counter += 1; // implict fallthrough case 1: counter += 2; break; default: counter += 3; // implicit break } } void main() { test_if(); test_ifelse(); test_if_compound(); test_if_compound2(); test_switch(); outx = counter; }" 28: String "test_ifelse" 33: String "test_if_compound" 38: String "test_if_compound2" 43: String "test_switch" 46: String "main" 50: String "int" 56: String "outx" 62: String "counter" 70: String "bool" Name 14 "main" Name 16 "test_if(" Name 26 "test_ifelse(" Name 31 "test_if_compound(" Name 36 "test_if_compound2(" Name 41 "test_switch(" Name 54 "outx" Name 60 "counter" Decorate 54(outx) Location 0 4: TypeVoid 5: TypeFunction 4 7: TypeInt 32 0 10: 7(int) Constant 32 11: 7(int) Constant 6 12: 7(int) Constant 0 9: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12 13: 7(int) Constant 3 6: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 20: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 2 21 23: 7(int) Constant 1 24: 7(int) Constant 4 25: 7(int) Constant 2 22: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 23 24 20 25 19: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 18 6 20 11 12 22 18 13 11 30: 7(int) Constant 12 29: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 28 6 20 30 12 22 28 13 30 35: 7(int) Constant 21 34: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 33 6 20 35 12 22 33 13 35 40: 7(int) Constant 29 39: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 38 6 20 40 12 22 38 13 40 45: 7(int) Constant 39 44: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 43 6 20 45 12 22 43 13 45 48: 7(int) Constant 53 47: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 46 6 20 48 12 22 46 13 48 49: TypeInt 32 1 51: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 50 10 24 12 52: TypePointer Output 49(int) 53: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 51 13 12 54(outx): 52(ptr) Variable Output 57: 7(int) Constant 8 55: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 56 51 20 13 12 22 56 54(outx) 57 58: TypePointer Private 49(int) 59: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 51 11 12 60(counter): 58(ptr) Variable Private 61: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 62 51 20 24 12 22 62 60(counter) 57 63: 49(int) Constant 0 69: TypeBool 71: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 70 10 25 12 72: 69(bool) ConstantFalse 76: 7(int) Constant 17 75: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 21(DebugLexicalBlock) 20 57 76 19 77: 49(int) Constant 1 84: 7(int) Constant 10 91: 7(int) Constant 14 90: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 21(DebugLexicalBlock) 20 91 76 29 97: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 21(DebugLexicalBlock) 20 76 76 29 98: 49(int) Constant 2 105: 7(int) Constant 19 112: 7(int) Constant 23 113: 7(int) Constant 9 111: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 21(DebugLexicalBlock) 20 112 113 34 119: 7(int) Constant 24 118: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 21(DebugLexicalBlock) 20 119 35 111 126: 7(int) Constant 27 133: 7(int) Constant 31 132: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 21(DebugLexicalBlock) 20 133 113 39 138: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 21(DebugLexicalBlock) 20 10 35 132 146: 7(int) Constant 35 150: 7(int) Constant 37 161: 7(int) Constant 42 166: 7(int) Constant 45 169: 7(int) Constant 46 171: 49(int) Constant 3 175: 7(int) Constant 48 180: 7(int) Constant 51 186: 7(int) Constant 54 189: 7(int) Constant 55 192: 7(int) Constant 56 195: 7(int) Constant 57 198: 7(int) Constant 58 201: 7(int) Constant 59 203: 7(int) Constant 60 14(main): 4 Function None 5 15: Label 64: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 22 65: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 24 24 12 12 Store 60(counter) 63 182: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 47 183: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 48 48 12 12 181: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 47 14(main) 185: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 186 186 12 12 184: 4 FunctionCall 16(test_if() 188: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 189 189 12 12 187: 4 FunctionCall 26(test_ifelse() 191: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 192 192 12 12 190: 4 FunctionCall 31(test_if_compound() 194: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 195 195 12 12 193: 4 FunctionCall 36(test_if_compound2() 197: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 198 198 12 12 196: 4 FunctionCall 41(test_switch() 200: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 201 201 12 12 199: 49(int) Load 60(counter) Store 54(outx) 199 202: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 203 203 12 12 Return FunctionEnd 16(test_if(): 4 Function None 5 17: Label 67: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 19 68: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 11 11 12 12 66: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 19 16(test_if() SelectionMerge 74 None BranchConditional 72 73 74 73: Label 79: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 75 80: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 57 57 12 12 78: 49(int) Load 60(counter) 81: 49(int) IAdd 78 77 Store 60(counter) 81 Branch 74 74: Label 82: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 19 83: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 84 84 12 12 Return FunctionEnd 26(test_ifelse(): 4 Function None 5 27: Label 86: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 29 87: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 30 30 12 12 85: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 29 26(test_ifelse() SelectionMerge 89 None BranchConditional 72 88 96 88: Label 93: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 90 94: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 91 91 12 12 92: 49(int) Load 60(counter) 95: 49(int) IAdd 92 77 Store 60(counter) 95 Branch 89 96: Label 100: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 97 101: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 76 76 12 12 99: 49(int) Load 60(counter) 102: 49(int) IAdd 99 98 Store 60(counter) 102 Branch 89 89: Label 103: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 29 104: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 105 105 12 12 Return FunctionEnd 31(test_if_compound(): 4 Function None 5 32: Label 107: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 34 108: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 35 35 12 12 106: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 34 31(test_if_compound() SelectionMerge 110 None BranchConditional 72 109 110 109: Label 116: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 111 117: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 35 35 12 12 SelectionMerge 115 None BranchConditional 72 114 115 114: Label 121: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 118 122: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 119 119 12 12 120: 49(int) Load 60(counter) 123: 49(int) IAdd 120 77 Store 60(counter) 123 Branch 115 115: Label Branch 110 110: Label 124: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 34 125: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 126 126 12 12 Return FunctionEnd 36(test_if_compound2(): 4 Function None 5 37: Label 128: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 39 129: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 40 40 12 12 127: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 39 36(test_if_compound2() SelectionMerge 131 None BranchConditional 72 130 131 130: Label 136: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 132 137: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 40 40 12 12 SelectionMerge 135 None BranchConditional 72 134 135 134: Label 140: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 138 141: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 10 10 12 12 139: 49(int) Load 60(counter) 142: 49(int) IAdd 139 77 Store 60(counter) 142 Branch 135 135: Label 144: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 132 145: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 146 146 12 12 143: 49(int) Load 60(counter) 147: 49(int) IAdd 143 98 Store 60(counter) 147 Branch 131 131: Label 148: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 39 149: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 150 150 12 12 Return FunctionEnd 41(test_switch(): 4 Function None 5 42: Label 152: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 44 153: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 45 45 12 12 151: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 44 41(test_switch() SelectionMerge 157 None Switch 63 156 case 0: 154 case 1: 155 156: Label 173: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 44 174: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 175 175 12 12 172: 49(int) Load 60(counter) 176: 49(int) IAdd 172 171 Store 60(counter) 176 Branch 157 154: Label 159: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 44 160: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 161 161 12 12 158: 49(int) Load 60(counter) 162: 49(int) IAdd 158 77 Store 60(counter) 162 Branch 155 155: Label 164: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 44 165: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 166 166 12 12 163: 49(int) Load 60(counter) 167: 49(int) IAdd 163 98 Store 60(counter) 167 168: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 169 169 12 12 Branch 157 157: Label 178: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 44 179: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 20 180 180 12 12 Return FunctionEnd