Force generateDebugInfo when non-semantic debug info is enabled

From the command line, the debug options "stack", with -gVS enabling all
of generateDebugInfo, emitNonSemanticShaderDebugInfo and
emitNonSemanticShaderDebugSource, however the programmatic interface
allows setting the latter options without the former. In this case, the
string corresponding to the source filename never gets emitted and some
debuginfo instructions end up with zero ID operands, resulting in
invalid SPIR-V.

Fixes #3240
This commit is contained in:
Arcady Goldmints-Orlov 2023-06-22 16:06:41 -04:00 committed by arcady-lunarg
parent 9575e33186
commit d89c0b1d13
14 changed files with 9392 additions and 8284 deletions

View file

@ -1,332 +1,364 @@
spv.debuginfo.glsl.geom
Validation failed
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 231
// Id's are bound by 256
Capability Geometry
Capability MultiViewport
Extension "SPV_KHR_non_semantic_info"
1: ExtInstImport "NonSemantic.Shader.DebugInfo.100"
2: ExtInstImport "GLSL.std.450"
2: ExtInstImport "NonSemantic.Shader.DebugInfo.100"
3: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Geometry 13 "main" 52 85 104 112 116 146 181 189 206 216 221 225
ExecutionMode 13 Triangles
ExecutionMode 13 Invocations 2
ExecutionMode 13 OutputTriangleStrip
ExecutionMode 13 OutputVertices 3
8: String "uint"
14: String "main"
17: String ""
25: String "int"
30: String "i"
43: String "bool"
47: String "float"
54: String "outNormal"
68: String "projection"
72: String "modelview"
75: String "lightPos"
78: String "UBO"
82: String "ubo"
87: String "gl_InvocationID"
106: String "inNormal"
114: String "outColor"
118: String "inColor"
125: String "pos"
132: String "gl_Position"
135: String "gl_PointSize"
138: String "gl_CullDistance"
142: String "gl_PerVertex"
148: String "gl_in"
155: String "worldPos"
166: String "lPos"
183: String "outLightVec"
191: String "outViewVec"
218: String "gl_ViewportIndex"
223: String "gl_PrimitiveID"
227: String "gl_PrimitiveIDIn"
EntryPoint Geometry 14 "main" 62 94 113 123 126 157 196 205 222 234 240 243
ExecutionMode 14 Triangles
ExecutionMode 14 Invocations 2
ExecutionMode 14 OutputTriangleStrip
ExecutionMode 14 OutputVertices 3
1: String ""
9: String "uint"
15: String "main"
18: String "// OpModuleProcessed auto-map-locations
// OpModuleProcessed auto-map-bindings
// OpModuleProcessed client vulkan100
// OpModuleProcessed target-env vulkan1.0
// OpModuleProcessed keep-uncalled
// OpModuleProcessed entry-point main
#line 1
"
29: String "int"
34: String "i"
50: String "bool"
57: String "float"
64: String "outNormal"
77: String "projection"
81: String "modelview"
84: String "lightPos"
87: String "UBO"
91: String "ubo"
96: String "gl_InvocationID"
115: String "inNormal"
125: String "outColor"
128: String "inColor"
137: String "pos"
143: String "gl_Position"
146: String "gl_PointSize"
149: String "gl_CullDistance"
153: String "gl_PerVertex"
159: String "gl_in"
168: String "worldPos"
180: String "lPos"
198: String "outLightVec"
207: String "outViewVec"
236: String "gl_ViewportIndex"
242: String "gl_PrimitiveID"
245: String "gl_PrimitiveIDIn"
SourceExtension "GL_ARB_viewport_array"
Name 13 "main"
Name 28 "i"
Name 52 "outNormal"
Name 66 "UBO"
MemberName 66(UBO) 0 "projection"
MemberName 66(UBO) 1 "modelview"
MemberName 66(UBO) 2 "lightPos"
Name 80 "ubo"
Name 85 "gl_InvocationID"
Name 104 "inNormal"
Name 112 "outColor"
Name 116 "inColor"
Name 123 "pos"
Name 130 "gl_PerVertex"
MemberName 130(gl_PerVertex) 0 "gl_Position"
MemberName 130(gl_PerVertex) 1 "gl_PointSize"
MemberName 130(gl_PerVertex) 2 "gl_ClipDistance"
MemberName 130(gl_PerVertex) 3 "gl_CullDistance"
Name 146 "gl_in"
Name 153 "worldPos"
Name 164 "lPos"
Name 181 "outLightVec"
Name 189 "outViewVec"
Name 196 "gl_PerVertex"
MemberName 196(gl_PerVertex) 0 "gl_Position"
MemberName 196(gl_PerVertex) 1 "gl_PointSize"
MemberName 196(gl_PerVertex) 2 "gl_ClipDistance"
MemberName 196(gl_PerVertex) 3 "gl_CullDistance"
Name 206 ""
Name 216 "gl_ViewportIndex"
Name 221 "gl_PrimitiveID"
Name 225 "gl_PrimitiveIDIn"
Decorate 52(outNormal) Location 0
Decorate 62 ArrayStride 64
Decorate 64 ArrayStride 64
MemberDecorate 66(UBO) 0 ColMajor
MemberDecorate 66(UBO) 0 Offset 0
MemberDecorate 66(UBO) 0 MatrixStride 16
MemberDecorate 66(UBO) 1 ColMajor
MemberDecorate 66(UBO) 1 Offset 128
MemberDecorate 66(UBO) 1 MatrixStride 16
MemberDecorate 66(UBO) 2 Offset 256
Decorate 66(UBO) Block
Decorate 80(ubo) DescriptorSet 0
Decorate 80(ubo) Binding 0
Decorate 85(gl_InvocationID) BuiltIn InvocationId
Decorate 104(inNormal) Location 0
Decorate 112(outColor) Location 1
Decorate 116(inColor) Location 1
MemberDecorate 130(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 130(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 130(gl_PerVertex) 2 BuiltIn ClipDistance
MemberDecorate 130(gl_PerVertex) 3 BuiltIn CullDistance
Decorate 130(gl_PerVertex) Block
Decorate 181(outLightVec) Location 3
Decorate 189(outViewVec) Location 2
MemberDecorate 196(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 196(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 196(gl_PerVertex) 2 BuiltIn ClipDistance
MemberDecorate 196(gl_PerVertex) 3 BuiltIn CullDistance
Decorate 196(gl_PerVertex) Block
Decorate 216(gl_ViewportIndex) BuiltIn ViewportIndex
Decorate 221(gl_PrimitiveID) BuiltIn PrimitiveId
Decorate 225(gl_PrimitiveIDIn) BuiltIn PrimitiveId
3: TypeVoid
4: TypeFunction 3
6: TypeInt 32 0
9: 6(int) Constant 32
10: 6(int) Constant 6
11: 6(int) Constant 0
7: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 9 10 11
12: 6(int) Constant 3
5: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 12 3
16: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 0 17
19: 6(int) Constant 1
20: 6(int) Constant 4
21: 6(int) Constant 2
18: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 19 20 16 21
15: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 14 5 16 11 11 18 14 12 11
24: TypeInt 32 1
26: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 25 9 20 11
27: TypePointer Function 24(int)
31: 6(int) Constant 49
29: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 30 26 16 31 11 15 20
33: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression)
34: 24(int) Constant 0
41: 24(int) Constant 3
42: TypeBool
44: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 43 9 21 11
46: TypeFloat 32
48: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 47 9 12 11
49: TypeVector 46(float) 3
50: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 48 12
51: TypePointer Output 49(fvec3)
52(outNormal): 51(ptr) Variable Output
55: 6(int) Constant 51
56: 6(int) Constant 8
53: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 54 50 16 55 11 18 54 52(outNormal) 56
57: TypeVector 46(float) 4
58: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 48 20
59: TypeMatrix 57(fvec4) 4
61: 42(bool) ConstantTrue
60: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 58 20 61
62: TypeArray 59 21
63: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 60 21
64: TypeArray 59 21
65: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 60 21
66(UBO): TypeStruct 62 64 57(fvec4)
69: 6(int) Constant 34
70: 6(int) Constant 7
67: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 68 63 16 69 70 11 11 12
73: 6(int) Constant 35
71: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 72 65 16 73 70 11 11 12
76: 6(int) Constant 36
74: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 75 58 16 76 70 11 11 12
77: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 78 19 16 55 11 18 78 11 12 67 71 74
79: TypePointer Uniform 66(UBO)
80(ubo): 79(ptr) Variable Uniform
81: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 82 77 16 55 11 18 82 80(ubo) 56
83: 24(int) Constant 1
84: TypePointer Input 24(int)
85(gl_InvocationID): 84(ptr) Variable Input
86: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 87 26 16 55 11 18 87 85(gl_InvocationID) 56
89: TypePointer Uniform 59
92: TypeMatrix 49(fvec3) 3
93: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 50 12 61
101: TypeArray 49(fvec3) 12
102: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 50 12
103: TypePointer Input 101
104(inNormal): 103(ptr) Variable Input
105: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 106 102 16 55 11 18 106 104(inNormal) 56
108: TypePointer Input 49(fvec3)
112(outColor): 51(ptr) Variable Output
115: 6(int) Constant 52
113: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 114 50 16 115 11 18 114 112(outColor) 56
116(inColor): 103(ptr) Variable Input
117: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 118 102 16 115 11 18 118 116(inColor) 56
122: TypePointer Function 57(fvec4)
126: 6(int) Constant 54
124: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 125 58 16 126 11 15 20
128: TypeArray 46(float) 19
129: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 48 19
130(gl_PerVertex): TypeStruct 57(fvec4) 46(float) 128 128
133: 6(int) Constant 23
131: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 132 58 16 21 133 11 11 12
136: 6(int) Constant 41
134: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 135 48 16 21 136 11 11 12
139: 6(int) Constant 84
137: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 138 129 16 21 139 11 11 12
140: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 138 129 16 21 139 11 11 12
141: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 142 19 16 126 11 18 142 11 12 131 134 137 140
143: TypeArray 130(gl_PerVertex) 12
144: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 141 12
145: TypePointer Input 143
146(gl_in): 145(ptr) Variable Input
147: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 148 144 16 126 11 18 148 146(gl_in) 56
150: TypePointer Input 57(fvec4)
156: 6(int) Constant 55
154: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 155 58 16 156 11 15 20
163: TypePointer Function 49(fvec3)
167: 6(int) Constant 57
165: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 166 50 16 167 11 15 20
172: 24(int) Constant 2
173: TypePointer Uniform 57(fvec4)
181(outLightVec): 51(ptr) Variable Output
184: 6(int) Constant 58
182: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 183 50 16 184 11 18 183 181(outLightVec) 56
189(outViewVec): 51(ptr) Variable Output
192: 6(int) Constant 59
190: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 191 50 16 192 11 18 191 189(outViewVec) 56
196(gl_PerVertex): TypeStruct 57(fvec4) 46(float) 128 128
198: 6(int) Constant 215
197: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 132 58 16 21 198 11 11 12
200: 6(int) Constant 233
199: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 135 48 16 21 200 11 11 12
201: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 138 129 16 12 70 11 11 12
202: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 138 129 16 12 70 11 11 12
204: 6(int) Constant 61
203: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 142 19 16 204 11 18 142 11 12 197 199 201 202
205: TypePointer Output 196(gl_PerVertex)
206: 205(ptr) Variable Output
207: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 17 203 16 204 11 18 17 206 56
213: TypePointer Output 57(fvec4)
215: TypePointer Output 24(int)
216(gl_ViewportIndex): 215(ptr) Variable Output
219: 6(int) Constant 64
217: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 218 26 16 219 11 18 218 216(gl_ViewportIndex) 56
221(gl_PrimitiveID): 215(ptr) Variable Output
224: 6(int) Constant 65
222: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 223 26 16 224 11 18 223 221(gl_PrimitiveID) 56
225(gl_PrimitiveIDIn): 84(ptr) Variable Input
226: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 227 26 16 224 11 18 227 225(gl_PrimitiveIDIn) 56
13(main): 3 Function None 4
22: Label
28(i): 27(ptr) Variable Function
123(pos): 122(ptr) Variable Function
153(worldPos): 122(ptr) Variable Function
164(lPos): 163(ptr) Variable Function
23: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 15 13(main)
32: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 29 28(i) 33
Store 28(i) 34
Branch 35
35: Label
LoopMerge 37 38 None
Branch 39
39: Label
40: 24(int) Load 28(i)
45: 42(bool) SLessThan 40 41
BranchConditional 45 36 37
36: Label
88: 24(int) Load 85(gl_InvocationID)
90: 89(ptr) AccessChain 80(ubo) 83 88
91: 59 Load 90
94: 57(fvec4) CompositeExtract 91 0
95: 49(fvec3) VectorShuffle 94 94 0 1 2
96: 57(fvec4) CompositeExtract 91 1
97: 49(fvec3) VectorShuffle 96 96 0 1 2
98: 57(fvec4) CompositeExtract 91 2
99: 49(fvec3) VectorShuffle 98 98 0 1 2
100: 92 CompositeConstruct 95 97 99
107: 24(int) Load 28(i)
109: 108(ptr) AccessChain 104(inNormal) 107
110: 49(fvec3) Load 109
111: 49(fvec3) MatrixTimesVector 100 110
Store 52(outNormal) 111
119: 24(int) Load 28(i)
120: 108(ptr) AccessChain 116(inColor) 119
121: 49(fvec3) Load 120
Store 112(outColor) 121
127: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 124 123(pos) 33
149: 24(int) Load 28(i)
151: 150(ptr) AccessChain 146(gl_in) 149 34
152: 57(fvec4) Load 151
Store 123(pos) 152
157: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 154 153(worldPos) 33
158: 24(int) Load 85(gl_InvocationID)
159: 89(ptr) AccessChain 80(ubo) 83 158
160: 59 Load 159
161: 57(fvec4) Load 123(pos)
162: 57(fvec4) MatrixTimesVector 160 161
Store 153(worldPos) 162
168: 3 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 165 164(lPos) 33
169: 24(int) Load 85(gl_InvocationID)
170: 89(ptr) AccessChain 80(ubo) 83 169
171: 59 Load 170
174: 173(ptr) AccessChain 80(ubo) 172
175: 57(fvec4) Load 174
176: 57(fvec4) MatrixTimesVector 171 175
177: 46(float) CompositeExtract 176 0
178: 46(float) CompositeExtract 176 1
179: 46(float) CompositeExtract 176 2
180: 49(fvec3) CompositeConstruct 177 178 179
Store 164(lPos) 180
185: 49(fvec3) Load 164(lPos)
186: 57(fvec4) Load 153(worldPos)
187: 49(fvec3) VectorShuffle 186 186 0 1 2
188: 49(fvec3) FSub 185 187
Store 181(outLightVec) 188
193: 57(fvec4) Load 153(worldPos)
194: 49(fvec3) VectorShuffle 193 193 0 1 2
195: 49(fvec3) FNegate 194
Store 189(outViewVec) 195
208: 24(int) Load 85(gl_InvocationID)
209: 89(ptr) AccessChain 80(ubo) 34 208
210: 59 Load 209
211: 57(fvec4) Load 153(worldPos)
212: 57(fvec4) MatrixTimesVector 210 211
214: 213(ptr) AccessChain 206 34
Store 214 212
220: 24(int) Load 85(gl_InvocationID)
Store 216(gl_ViewportIndex) 220
228: 24(int) Load 225(gl_PrimitiveIDIn)
Store 221(gl_PrimitiveID) 228
Name 14 "main"
Name 32 "i"
Name 62 "outNormal"
Name 75 "UBO"
MemberName 75(UBO) 0 "projection"
MemberName 75(UBO) 1 "modelview"
MemberName 75(UBO) 2 "lightPos"
Name 89 "ubo"
Name 94 "gl_InvocationID"
Name 113 "inNormal"
Name 123 "outColor"
Name 126 "inColor"
Name 135 "pos"
Name 141 "gl_PerVertex"
MemberName 141(gl_PerVertex) 0 "gl_Position"
MemberName 141(gl_PerVertex) 1 "gl_PointSize"
MemberName 141(gl_PerVertex) 2 "gl_ClipDistance"
MemberName 141(gl_PerVertex) 3 "gl_CullDistance"
Name 157 "gl_in"
Name 166 "worldPos"
Name 178 "lPos"
Name 196 "outLightVec"
Name 205 "outViewVec"
Name 213 "gl_PerVertex"
MemberName 213(gl_PerVertex) 0 "gl_Position"
MemberName 213(gl_PerVertex) 1 "gl_PointSize"
MemberName 213(gl_PerVertex) 2 "gl_ClipDistance"
MemberName 213(gl_PerVertex) 3 "gl_CullDistance"
Name 222 ""
Name 234 "gl_ViewportIndex"
Name 240 "gl_PrimitiveID"
Name 243 "gl_PrimitiveIDIn"
Decorate 62(outNormal) Location 0
Decorate 71 ArrayStride 64
Decorate 73 ArrayStride 64
MemberDecorate 75(UBO) 0 ColMajor
MemberDecorate 75(UBO) 0 Offset 0
MemberDecorate 75(UBO) 0 MatrixStride 16
MemberDecorate 75(UBO) 1 ColMajor
MemberDecorate 75(UBO) 1 Offset 128
MemberDecorate 75(UBO) 1 MatrixStride 16
MemberDecorate 75(UBO) 2 Offset 256
Decorate 75(UBO) Block
Decorate 89(ubo) DescriptorSet 0
Decorate 89(ubo) Binding 0
Decorate 94(gl_InvocationID) BuiltIn InvocationId
Decorate 113(inNormal) Location 0
Decorate 123(outColor) Location 1
Decorate 126(inColor) Location 1
MemberDecorate 141(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 141(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 141(gl_PerVertex) 2 BuiltIn ClipDistance
MemberDecorate 141(gl_PerVertex) 3 BuiltIn CullDistance
Decorate 141(gl_PerVertex) Block
Decorate 196(outLightVec) Location 3
Decorate 205(outViewVec) Location 2
MemberDecorate 213(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 213(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 213(gl_PerVertex) 2 BuiltIn ClipDistance
MemberDecorate 213(gl_PerVertex) 3 BuiltIn CullDistance
Decorate 213(gl_PerVertex) Block
Decorate 234(gl_ViewportIndex) BuiltIn ViewportIndex
Decorate 240(gl_PrimitiveID) BuiltIn PrimitiveId
Decorate 243(gl_PrimitiveIDIn) BuiltIn PrimitiveId
4: TypeVoid
5: TypeFunction 4
7: TypeInt 32 0
10: 7(int) Constant 32
11: 7(int) Constant 6
12: 7(int) Constant 0
8: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 10 11 12
13: 7(int) Constant 3
6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4
17: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 18
20: 7(int) Constant 1
21: 7(int) Constant 4
22: 7(int) Constant 2
19: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 20 21 17 22
16: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 15 6 17 12 12 19 15 13 12
27: 7(int) Constant 49
28: TypeInt 32 1
30: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 29 10 21 12
31: TypePointer Function 28(int)
33: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 34 30 17 27 12 16 21
36: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression)
37: 28(int) Constant 0
48: 28(int) Constant 3
49: TypeBool
51: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 50 10 22 12
55: 7(int) Constant 51
56: TypeFloat 32
58: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 57 10 13 12
59: TypeVector 56(float) 3
60: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 58 13
61: TypePointer Output 59(fvec3)
62(outNormal): 61(ptr) Variable Output
65: 7(int) Constant 8
63: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 64 60 17 55 12 19 64 62(outNormal) 65
66: TypeVector 56(float) 4
67: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 58 21
68: TypeMatrix 66(fvec4) 4
70: 49(bool) ConstantTrue
69: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 67 21 70
71: TypeArray 68 22
72: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 69 22
73: TypeArray 68 22
74: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 69 22
75(UBO): TypeStruct 71 73 66(fvec4)
78: 7(int) Constant 34
79: 7(int) Constant 7
76: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 77 72 17 78 79 12 12 13
82: 7(int) Constant 35
80: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 81 74 17 82 79 12 12 13
85: 7(int) Constant 36
83: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 84 67 17 85 79 12 12 13
86: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 87 20 17 55 12 19 87 12 13 76 80 83
88: TypePointer Uniform 75(UBO)
89(ubo): 88(ptr) Variable Uniform
90: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 91 86 17 55 12 19 91 89(ubo) 65
92: 28(int) Constant 1
93: TypePointer Input 28(int)
94(gl_InvocationID): 93(ptr) Variable Input
95: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 96 30 17 55 12 19 96 94(gl_InvocationID) 65
98: TypePointer Uniform 68
101: TypeMatrix 59(fvec3) 3
102: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 60 13 70
110: TypeArray 59(fvec3) 13
111: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 60 13
112: TypePointer Input 110
113(inNormal): 112(ptr) Variable Input
114: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 115 111 17 55 12 19 115 113(inNormal) 65
117: TypePointer Input 59(fvec3)
122: 7(int) Constant 52
123(outColor): 61(ptr) Variable Output
124: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 125 60 17 122 12 19 125 123(outColor) 65
126(inColor): 112(ptr) Variable Input
127: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 128 111 17 122 12 19 128 126(inColor) 65
133: 7(int) Constant 54
134: TypePointer Function 66(fvec4)
136: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 137 67 17 133 12 16 21
139: TypeArray 56(float) 20
140: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 58 20
141(gl_PerVertex): TypeStruct 66(fvec4) 56(float) 139 139
144: 7(int) Constant 23
142: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 143 67 17 22 144 12 12 13
147: 7(int) Constant 41
145: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 146 58 17 22 147 12 12 13
150: 7(int) Constant 84
148: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 149 140 17 22 150 12 12 13
151: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 149 140 17 22 150 12 12 13
152: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 153 20 17 133 12 19 153 12 13 142 145 148 151
154: TypeArray 141(gl_PerVertex) 13
155: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 152 13
156: TypePointer Input 154
157(gl_in): 156(ptr) Variable Input
158: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 159 155 17 133 12 19 159 157(gl_in) 65
161: TypePointer Input 66(fvec4)
165: 7(int) Constant 55
167: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 168 67 17 165 12 16 21
176: 7(int) Constant 57
177: TypePointer Function 59(fvec3)
179: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 180 60 17 176 12 16 21
185: 28(int) Constant 2
186: TypePointer Uniform 66(fvec4)
195: 7(int) Constant 58
196(outLightVec): 61(ptr) Variable Output
197: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 198 60 17 195 12 19 198 196(outLightVec) 65
204: 7(int) Constant 59
205(outViewVec): 61(ptr) Variable Output
206: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 207 60 17 204 12 19 207 205(outViewVec) 65
212: 7(int) Constant 61
213(gl_PerVertex): TypeStruct 66(fvec4) 56(float) 139 139
215: 7(int) Constant 215
214: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 143 67 17 22 215 12 12 13
217: 7(int) Constant 233
216: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 146 58 17 22 217 12 12 13
218: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 149 140 17 13 79 12 12 13
219: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 149 140 17 13 79 12 12 13
220: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 153 20 17 212 12 19 153 12 13 214 216 218 219
221: TypePointer Output 213(gl_PerVertex)
222: 221(ptr) Variable Output
223: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 220 17 212 12 19 1 222 65
229: TypePointer Output 66(fvec4)
232: 7(int) Constant 64
233: TypePointer Output 28(int)
234(gl_ViewportIndex): 233(ptr) Variable Output
235: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 236 30 17 232 12 19 236 234(gl_ViewportIndex) 65
239: 7(int) Constant 65
240(gl_PrimitiveID): 233(ptr) Variable Output
241: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 242 30 17 239 12 19 242 240(gl_PrimitiveID) 65
243(gl_PrimitiveIDIn): 93(ptr) Variable Input
244: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 245 30 17 239 12 19 245 243(gl_PrimitiveIDIn) 65
248: 7(int) Constant 66
255: 7(int) Constant 68
Line 1 47 15
14(main): 4 Function None 5
23: Label
32(i): 31(ptr) Variable Function
135(pos): 134(ptr) Variable Function
166(worldPos): 134(ptr) Variable Function
178(lPos): 177(ptr) Variable Function
24: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 16 14(main)
25: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16
26: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 27 27 12 12
35: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 33 32(i) 36
Store 32(i) 37
Branch 38
38: Label
42: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16
43: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 27 27 12 12
LoopMerge 40 41 None
Branch 44
44: Label
45: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16
46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 27 27 12 12
47: 28(int) Load 32(i)
52: 49(bool) SLessThan 47 48
BranchConditional 52 39 40
39: Label
53: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16
54: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 55 55 12 12
97: 28(int) Load 94(gl_InvocationID)
99: 98(ptr) AccessChain 89(ubo) 92 97
100: 68 Load 99
103: 66(fvec4) CompositeExtract 100 0
104: 59(fvec3) VectorShuffle 103 103 0 1 2
105: 66(fvec4) CompositeExtract 100 1
106: 59(fvec3) VectorShuffle 105 105 0 1 2
107: 66(fvec4) CompositeExtract 100 2
108: 59(fvec3) VectorShuffle 107 107 0 1 2
109: 101 CompositeConstruct 104 106 108
116: 28(int) Load 32(i)
118: 117(ptr) AccessChain 113(inNormal) 116
119: 59(fvec3) Load 118
120: 59(fvec3) MatrixTimesVector 109 119
Store 62(outNormal) 120
121: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 122 122 12 12
129: 28(int) Load 32(i)
130: 117(ptr) AccessChain 126(inColor) 129
131: 59(fvec3) Load 130
Store 123(outColor) 131
132: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 133 133 12 12
138: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 136 135(pos) 36
160: 28(int) Load 32(i)
162: 161(ptr) AccessChain 157(gl_in) 160 37
163: 66(fvec4) Load 162
Store 135(pos) 163
164: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 165 165 12 12
169: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 167 166(worldPos) 36
170: 28(int) Load 94(gl_InvocationID)
171: 98(ptr) AccessChain 89(ubo) 92 170
172: 68 Load 171
173: 66(fvec4) Load 135(pos)
174: 66(fvec4) MatrixTimesVector 172 173
Store 166(worldPos) 174
175: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 176 176 12 12
181: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 179 178(lPos) 36
182: 28(int) Load 94(gl_InvocationID)
183: 98(ptr) AccessChain 89(ubo) 92 182
184: 68 Load 183
187: 186(ptr) AccessChain 89(ubo) 185
188: 66(fvec4) Load 187
189: 66(fvec4) MatrixTimesVector 184 188
190: 56(float) CompositeExtract 189 0
191: 56(float) CompositeExtract 189 1
192: 56(float) CompositeExtract 189 2
193: 59(fvec3) CompositeConstruct 190 191 192
Store 178(lPos) 193
194: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 195 195 12 12
199: 59(fvec3) Load 178(lPos)
200: 66(fvec4) Load 166(worldPos)
201: 59(fvec3) VectorShuffle 200 200 0 1 2
202: 59(fvec3) FSub 199 201
Store 196(outLightVec) 202
203: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 204 204 12 12
208: 66(fvec4) Load 166(worldPos)
209: 59(fvec3) VectorShuffle 208 208 0 1 2
210: 59(fvec3) FNegate 209
Store 205(outViewVec) 210
211: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 212 212 12 12
224: 28(int) Load 94(gl_InvocationID)
225: 98(ptr) AccessChain 89(ubo) 37 224
226: 68 Load 225
227: 66(fvec4) Load 166(worldPos)
228: 66(fvec4) MatrixTimesVector 226 227
230: 229(ptr) AccessChain 222 37
Store 230 228
231: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 232 232 12 12
237: 28(int) Load 94(gl_InvocationID)
Store 234(gl_ViewportIndex) 237
238: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 239 239 12 12
246: 28(int) Load 243(gl_PrimitiveIDIn)
Store 240(gl_PrimitiveID) 246
247: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 248 248 12 12
EmitVertex
Branch 41
41: Label
249: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16
250: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 27 27 12 12
251: 28(int) Load 32(i)
252: 28(int) IAdd 251 92
Store 32(i) 252
Branch 38
38: Label
229: 24(int) Load 28(i)
230: 24(int) IAdd 229 83
Store 28(i) 230
Branch 35
37: Label
40: Label
253: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16
254: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 255 255 12 12
EndPrimitive
Return
FunctionEnd