Add correct line number to OpDebugFunction and OpDebugScope for function:

1. Pull OpDebugFunction, OpDebugScope and OpDebugVariable for params out
   of makeFunctionEntry.
2. Put above in a separate function called setupDebugFunctionEntry,
   which also accept line number and set it correctly in builder.
3. Call setupDebugFunctionEntry in makeFunction. Also special case
   handle entry function since it's created ealier elsewhere.
This commit is contained in:
Chao Chen 2023-10-12 05:42:55 +01:00
parent a2fb1ba2ad
commit 979423d84f
19 changed files with 9076 additions and 9016 deletions

View file

@ -1,7 +1,7 @@
spv.debuginfo.hlsl.geom
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 353
// Id's are bound by 354
Capability Geometry
Capability MultiViewport
@ -9,7 +9,7 @@ spv.debuginfo.hlsl.geom
2: ExtInstImport "NonSemantic.Shader.DebugInfo.100"
3: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Geometry 6 "main" 255 261 266 272 277 282 287 302 309 314 338 341
EntryPoint Geometry 6 "main" 256 262 267 273 278 283 288 303 310 315 339 342
ExecutionMode 6 Triangles
ExecutionMode 6 Invocations 2
ExecutionMode 6 OutputTriangleStrip
@ -32,29 +32,29 @@ spv.debuginfo.hlsl.geom
47: String "PrimitiveID"
52: String "LightVec"
58: String "GSOutput"
68: String "@main"
74: String "input"
78: String "outStream"
82: String "InvocationID"
91: String "int"
96: String "i"
111: String "bool"
119: String "output"
141: String "projection"
145: String "modelview"
149: String "lightPos"
153: String "UBO"
156: String "ubo"
191: String "pos"
200: String "worldPos"
211: String "lPos"
257: String "outStream.Pos"
263: String "outStream.ViewportIndex"
268: String "outStream.PrimitiveID"
274: String "outStream.Normal"
279: String "outStream.Color"
284: String "outStream.ViewVec"
289: String "outStream.LightVec"
69: String "@main"
75: String "input"
79: String "outStream"
83: String "InvocationID"
92: String "int"
97: String "i"
112: String "bool"
120: String "output"
142: String "projection"
146: String "modelview"
150: String "lightPos"
154: String "UBO"
157: String "ubo"
192: String "pos"
201: String "worldPos"
212: String "lPos"
258: String "outStream.Pos"
264: String "outStream.ViewportIndex"
269: String "outStream.PrimitiveID"
275: String "outStream.Normal"
280: String "outStream.Color"
285: String "outStream.ViewVec"
290: String "outStream.LightVec"
Name 6 "main"
Name 23 "VSOutput"
MemberName 23(VSOutput) 0 "Pos"
@ -73,63 +73,63 @@ spv.debuginfo.hlsl.geom
Name 64 "outStream"
Name 65 "InvocationID"
Name 66 "PrimitiveID"
Name 94 "i"
Name 117 "output"
Name 139 "UBO"
MemberName 139(UBO) 0 "projection"
MemberName 139(UBO) 1 "modelview"
MemberName 139(UBO) 2 "lightPos"
Name 154 "ubo"
MemberName 154(ubo) 0 "ubo"
Name 160 ""
Name 189 "pos"
Name 198 "worldPos"
Name 209 "lPos"
Name 255 "outStream.Pos"
Name 261 "outStream.ViewportIndex"
Name 266 "outStream.PrimitiveID"
Name 272 "outStream.Normal"
Name 277 "outStream.Color"
Name 282 "outStream.ViewVec"
Name 287 "outStream.LightVec"
Name 299 "input"
Name 302 "input.Pos"
Name 309 "input.Normal"
Name 314 "input.Color"
Name 336 "InvocationID"
Name 338 "InvocationID"
Name 340 "PrimitiveID"
Name 95 "i"
Name 118 "output"
Name 140 "UBO"
MemberName 140(UBO) 0 "projection"
MemberName 140(UBO) 1 "modelview"
MemberName 140(UBO) 2 "lightPos"
Name 155 "ubo"
MemberName 155(ubo) 0 "ubo"
Name 161 ""
Name 190 "pos"
Name 199 "worldPos"
Name 210 "lPos"
Name 256 "outStream.Pos"
Name 262 "outStream.ViewportIndex"
Name 267 "outStream.PrimitiveID"
Name 273 "outStream.Normal"
Name 278 "outStream.Color"
Name 283 "outStream.ViewVec"
Name 288 "outStream.LightVec"
Name 300 "input"
Name 303 "input.Pos"
Name 310 "input.Normal"
Name 315 "input.Color"
Name 337 "InvocationID"
Name 339 "InvocationID"
Name 341 "PrimitiveID"
Name 343 "outStream"
Name 344 "param"
Name 346 "param"
Name 342 "PrimitiveID"
Name 344 "outStream"
Name 345 "param"
Name 347 "param"
Name 349 "param"
Decorate 135 ArrayStride 64
Decorate 137 ArrayStride 64
MemberDecorate 139(UBO) 0 RowMajor
MemberDecorate 139(UBO) 0 Offset 0
MemberDecorate 139(UBO) 0 MatrixStride 16
MemberDecorate 139(UBO) 1 RowMajor
MemberDecorate 139(UBO) 1 Offset 128
MemberDecorate 139(UBO) 1 MatrixStride 16
MemberDecorate 139(UBO) 2 Offset 256
MemberDecorate 154(ubo) 0 Offset 0
Decorate 154(ubo) Block
Decorate 160 DescriptorSet 0
Decorate 160 Binding 0
Decorate 255(outStream.Pos) BuiltIn Position
Decorate 261(outStream.ViewportIndex) BuiltIn ViewportIndex
Decorate 266(outStream.PrimitiveID) BuiltIn PrimitiveId
Decorate 272(outStream.Normal) Location 0
Decorate 277(outStream.Color) Location 1
Decorate 282(outStream.ViewVec) Location 2
Decorate 287(outStream.LightVec) Location 3
Decorate 302(input.Pos) BuiltIn Position
Decorate 309(input.Normal) Location 0
Decorate 314(input.Color) Location 1
Decorate 338(InvocationID) BuiltIn InvocationId
Decorate 341(PrimitiveID) BuiltIn PrimitiveId
Name 348 "param"
Name 350 "param"
Decorate 136 ArrayStride 64
Decorate 138 ArrayStride 64
MemberDecorate 140(UBO) 0 RowMajor
MemberDecorate 140(UBO) 0 Offset 0
MemberDecorate 140(UBO) 0 MatrixStride 16
MemberDecorate 140(UBO) 1 RowMajor
MemberDecorate 140(UBO) 1 Offset 128
MemberDecorate 140(UBO) 1 MatrixStride 16
MemberDecorate 140(UBO) 2 Offset 256
MemberDecorate 155(ubo) 0 Offset 0
Decorate 155(ubo) Block
Decorate 161 DescriptorSet 0
Decorate 161 Binding 0
Decorate 256(outStream.Pos) BuiltIn Position
Decorate 262(outStream.ViewportIndex) BuiltIn ViewportIndex
Decorate 267(outStream.PrimitiveID) BuiltIn PrimitiveId
Decorate 273(outStream.Normal) Location 0
Decorate 278(outStream.Color) Location 1
Decorate 283(outStream.ViewVec) Location 2
Decorate 288(outStream.LightVec) Location 3
Decorate 303(input.Pos) BuiltIn Position
Decorate 310(input.Normal) Location 0
Decorate 315(input.Color) Location 1
Decorate 339(InvocationID) BuiltIn InvocationId
Decorate 342(PrimitiveID) BuiltIn PrimitiveId
4: TypeVoid
5: TypeFunction 4
8: TypeFloat 32
@ -178,170 +178,171 @@ spv.debuginfo.hlsl.geom
60: TypePointer Function 11(int)
61: TypeFunction 4 42(ptr) 59(ptr) 60(ptr) 60(ptr)
62: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 4 41 57 13 13
69: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 68 62 26 16 16 38 68 17 16
73: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 74 41 26 16 16 69 19 37
76: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression)
79: 11(int) Constant 2
77: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 78 57 26 16 16 69 19 79
81: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 82 13 26 16 16 69 19 17
84: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 47 13 26 16 16 69 19 19
89: 11(int) Constant 57
90: TypeInt 32 1
92: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 91 14 19 16
93: TypePointer Function 90(int)
95: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 96 92 26 89 16 69 19
98: 90(int) Constant 0
109: 90(int) Constant 3
110: TypeBool
112: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 111 14 79 16
116: 11(int) Constant 59
118: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 119 57 26 116 16 69 19
121: 8(float) Constant 0
122: 18(fvec4) ConstantComposite 121 121 121 121
123: 21(fvec3) ConstantComposite 121 121 121
124:43(GSOutput) ConstantComposite 122 16 16 123 123 123 123
126: 11(int) Constant 60
128: 90(int) Constant 1
129: TypePointer Function 21(fvec3)
132: TypeMatrix 18(fvec4) 4
134: 110(bool) ConstantTrue
133: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 20 19 134
135: TypeArray 132 79
136: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 133 79
137: TypeArray 132 79
138: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 133 79
139(UBO): TypeStruct 135 137 18(fvec4)
142: 11(int) Constant 28
143: 11(int) Constant 21
140: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 141 136 26 142 143 16 16 17
146: 11(int) Constant 29
147: 11(int) Constant 20
144: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 145 138 26 146 147 16 16 17
150: 11(int) Constant 30
151: 11(int) Constant 17
148: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 149 20 26 150 151 16 16 17
152: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 153 37 26 126 16 38 153 16 17 140 144 148
154(ubo): TypeStruct 139(UBO)
157: 11(int) Constant 33
155: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 156 152 26 157 28 16 16 17
158: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 156 37 26 126 16 38 156 16 17 155
159: TypePointer Uniform 154(ubo)
160: 159(ptr) Variable Uniform
162: 11(int) Constant 8
161: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 158 26 126 16 38 1 160 162
164: TypePointer Uniform 132
167: TypeMatrix 21(fvec3) 3
168: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 22 17 134
179: 11(int) Constant 61
180: 90(int) Constant 4
182: 90(int) Constant 2
187: 11(int) Constant 63
188: TypePointer Function 18(fvec4)
190: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 191 20 26 187 16 69 19
197: 11(int) Constant 64
199: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 200 20 26 197 16 69 19
208: 11(int) Constant 66
210: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 211 22 26 208 16 69 19
213: TypePointer Uniform 18(fvec4)
222: 11(int) Constant 67
223: 90(int) Constant 6
230: 11(int) Constant 68
231: 90(int) Constant 5
237: 11(int) Constant 70
245: 11(int) Constant 73
249: 11(int) Constant 74
253: 11(int) Constant 75
254: TypePointer Output 18(fvec4)
255(outStream.Pos): 254(ptr) Variable Output
256: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 257 20 26 253 16 38 257 255(outStream.Pos) 162
260: TypePointer Output 11(int)
261(outStream.ViewportIndex): 260(ptr) Variable Output
262: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 263 13 26 253 16 38 263 261(outStream.ViewportIndex) 162
266(outStream.PrimitiveID): 260(ptr) Variable Output
267: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 268 13 26 253 16 38 268 266(outStream.PrimitiveID) 162
271: TypePointer Output 21(fvec3)
272(outStream.Normal): 271(ptr) Variable Output
273: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 274 22 26 253 16 38 274 272(outStream.Normal) 162
277(outStream.Color): 271(ptr) Variable Output
278: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 279 22 26 253 16 38 279 277(outStream.Color) 162
282(outStream.ViewVec): 271(ptr) Variable Output
283: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 284 22 26 253 16 38 284 282(outStream.ViewVec) 162
287(outStream.LightVec): 271(ptr) Variable Output
288: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 289 22 26 253 16 38 289 287(outStream.LightVec) 162
298: 11(int) Constant 78
300: TypeArray 18(fvec4) 17
301: TypePointer Input 300
302(input.Pos): 301(ptr) Variable Input
303: TypePointer Input 18(fvec4)
307: TypeArray 21(fvec3) 17
308: TypePointer Input 307
309(input.Normal): 308(ptr) Variable Input
310: TypePointer Input 21(fvec3)
314(input.Color): 308(ptr) Variable Input
337: TypePointer Input 11(int)
338(InvocationID): 337(ptr) Variable Input
341(PrimitiveID): 337(ptr) Variable Input
71: 11(int) Constant 56
70: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 69 62 26 71 16 38 69 17 71
74: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 75 41 26 71 16 70 19 37
77: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression)
80: 11(int) Constant 2
78: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 79 57 26 71 16 70 19 80
82: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 83 13 26 71 16 70 19 17
85: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 47 13 26 71 16 70 19 19
90: 11(int) Constant 57
91: TypeInt 32 1
93: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 92 14 19 16
94: TypePointer Function 91(int)
96: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 97 93 26 90 16 70 19
99: 91(int) Constant 0
110: 91(int) Constant 3
111: TypeBool
113: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 112 14 80 16
117: 11(int) Constant 59
119: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 120 57 26 117 16 70 19
122: 8(float) Constant 0
123: 18(fvec4) ConstantComposite 122 122 122 122
124: 21(fvec3) ConstantComposite 122 122 122
125:43(GSOutput) ConstantComposite 123 16 16 124 124 124 124
127: 11(int) Constant 60
129: 91(int) Constant 1
130: TypePointer Function 21(fvec3)
133: TypeMatrix 18(fvec4) 4
135: 111(bool) ConstantTrue
134: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 20 19 135
136: TypeArray 133 80
137: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 134 80
138: TypeArray 133 80
139: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 134 80
140(UBO): TypeStruct 136 138 18(fvec4)
143: 11(int) Constant 28
144: 11(int) Constant 21
141: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 142 137 26 143 144 16 16 17
147: 11(int) Constant 29
148: 11(int) Constant 20
145: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 146 139 26 147 148 16 16 17
151: 11(int) Constant 30
152: 11(int) Constant 17
149: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 150 20 26 151 152 16 16 17
153: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 154 37 26 127 16 38 154 16 17 141 145 149
155(ubo): TypeStruct 140(UBO)
158: 11(int) Constant 33
156: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 157 153 26 158 28 16 16 17
159: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 157 37 26 127 16 38 157 16 17 156
160: TypePointer Uniform 155(ubo)
161: 160(ptr) Variable Uniform
163: 11(int) Constant 8
162: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 159 26 127 16 38 1 161 163
165: TypePointer Uniform 133
168: TypeMatrix 21(fvec3) 3
169: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 22 17 135
180: 11(int) Constant 61
181: 91(int) Constant 4
183: 91(int) Constant 2
188: 11(int) Constant 63
189: TypePointer Function 18(fvec4)
191: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 192 20 26 188 16 70 19
198: 11(int) Constant 64
200: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 201 20 26 198 16 70 19
209: 11(int) Constant 66
211: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 212 22 26 209 16 70 19
214: TypePointer Uniform 18(fvec4)
223: 11(int) Constant 67
224: 91(int) Constant 6
231: 11(int) Constant 68
232: 91(int) Constant 5
238: 11(int) Constant 70
246: 11(int) Constant 73
250: 11(int) Constant 74
254: 11(int) Constant 75
255: TypePointer Output 18(fvec4)
256(outStream.Pos): 255(ptr) Variable Output
257: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 258 20 26 254 16 38 258 256(outStream.Pos) 163
261: TypePointer Output 11(int)
262(outStream.ViewportIndex): 261(ptr) Variable Output
263: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 264 13 26 254 16 38 264 262(outStream.ViewportIndex) 163
267(outStream.PrimitiveID): 261(ptr) Variable Output
268: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 269 13 26 254 16 38 269 267(outStream.PrimitiveID) 163
272: TypePointer Output 21(fvec3)
273(outStream.Normal): 272(ptr) Variable Output
274: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 275 22 26 254 16 38 275 273(outStream.Normal) 163
278(outStream.Color): 272(ptr) Variable Output
279: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 280 22 26 254 16 38 280 278(outStream.Color) 163
283(outStream.ViewVec): 272(ptr) Variable Output
284: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 285 22 26 254 16 38 285 283(outStream.ViewVec) 163
288(outStream.LightVec): 272(ptr) Variable Output
289: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 290 22 26 254 16 38 290 288(outStream.LightVec) 163
299: 11(int) Constant 78
301: TypeArray 18(fvec4) 17
302: TypePointer Input 301
303(input.Pos): 302(ptr) Variable Input
304: TypePointer Input 18(fvec4)
308: TypeArray 21(fvec3) 17
309: TypePointer Input 308
310(input.Normal): 309(ptr) Variable Input
311: TypePointer Input 21(fvec3)
315(input.Color): 309(ptr) Variable Input
338: TypePointer Input 11(int)
339(InvocationID): 338(ptr) Variable Input
342(PrimitiveID): 338(ptr) Variable Input
Line 1 56 1
6(main): 4 Function None 5
7: Label
299(input): 42(ptr) Variable Function
336(InvocationID): 60(ptr) Variable Function
340(PrimitiveID): 60(ptr) Variable Function
343(outStream): 59(ptr) Variable Function
344(param): 42(ptr) Variable Function
346(param): 59(ptr) Variable Function
347(param): 60(ptr) Variable Function
349(param): 60(ptr) Variable Function
300(input): 42(ptr) Variable Function
337(InvocationID): 60(ptr) Variable Function
341(PrimitiveID): 60(ptr) Variable Function
344(outStream): 59(ptr) Variable Function
345(param): 42(ptr) Variable Function
347(param): 59(ptr) Variable Function
348(param): 60(ptr) Variable Function
350(param): 60(ptr) Variable Function
Line 1 56 0
304: 303(ptr) AccessChain 302(input.Pos) 98
305: 18(fvec4) Load 304
306: 188(ptr) AccessChain 299(input) 98 98
Store 306 305
311: 310(ptr) AccessChain 309(input.Normal) 98
312: 21(fvec3) Load 311
313: 129(ptr) AccessChain 299(input) 98 128
Store 313 312
315: 310(ptr) AccessChain 314(input.Color) 98
316: 21(fvec3) Load 315
317: 129(ptr) AccessChain 299(input) 98 182
Store 317 316
318: 303(ptr) AccessChain 302(input.Pos) 128
319: 18(fvec4) Load 318
320: 188(ptr) AccessChain 299(input) 128 98
Store 320 319
321: 310(ptr) AccessChain 309(input.Normal) 128
322: 21(fvec3) Load 321
323: 129(ptr) AccessChain 299(input) 128 128
Store 323 322
324: 310(ptr) AccessChain 314(input.Color) 128
325: 21(fvec3) Load 324
326: 129(ptr) AccessChain 299(input) 128 182
Store 326 325
327: 303(ptr) AccessChain 302(input.Pos) 182
328: 18(fvec4) Load 327
329: 188(ptr) AccessChain 299(input) 182 98
Store 329 328
330: 310(ptr) AccessChain 309(input.Normal) 182
331: 21(fvec3) Load 330
332: 129(ptr) AccessChain 299(input) 182 128
Store 332 331
333: 310(ptr) AccessChain 314(input.Color) 182
334: 21(fvec3) Load 333
335: 129(ptr) AccessChain 299(input) 182 182
Store 335 334
339: 11(int) Load 338(InvocationID)
Store 336(InvocationID) 339
342: 11(int) Load 341(PrimitiveID)
Store 340(PrimitiveID) 342
345: 40 Load 299(input)
Store 344(param) 345
348: 11(int) Load 336(InvocationID)
Store 347(param) 348
350: 11(int) Load 340(PrimitiveID)
Store 349(param) 350
351: 4 FunctionCall 67(@main(struct-VSOutput-vf4-vf3-vf31[3];struct-GSOutput-vf4-u1-u1-vf3-vf3-vf3-vf31;u1;u1;) 344(param) 346(param) 347(param) 349(param)
352:43(GSOutput) Load 346(param)
Store 343(outStream) 352
305: 304(ptr) AccessChain 303(input.Pos) 99
306: 18(fvec4) Load 305
307: 189(ptr) AccessChain 300(input) 99 99
Store 307 306
312: 311(ptr) AccessChain 310(input.Normal) 99
313: 21(fvec3) Load 312
314: 130(ptr) AccessChain 300(input) 99 129
Store 314 313
316: 311(ptr) AccessChain 315(input.Color) 99
317: 21(fvec3) Load 316
318: 130(ptr) AccessChain 300(input) 99 183
Store 318 317
319: 304(ptr) AccessChain 303(input.Pos) 129
320: 18(fvec4) Load 319
321: 189(ptr) AccessChain 300(input) 129 99
Store 321 320
322: 311(ptr) AccessChain 310(input.Normal) 129
323: 21(fvec3) Load 322
324: 130(ptr) AccessChain 300(input) 129 129
Store 324 323
325: 311(ptr) AccessChain 315(input.Color) 129
326: 21(fvec3) Load 325
327: 130(ptr) AccessChain 300(input) 129 183
Store 327 326
328: 304(ptr) AccessChain 303(input.Pos) 183
329: 18(fvec4) Load 328
330: 189(ptr) AccessChain 300(input) 183 99
Store 330 329
331: 311(ptr) AccessChain 310(input.Normal) 183
332: 21(fvec3) Load 331
333: 130(ptr) AccessChain 300(input) 183 129
Store 333 332
334: 311(ptr) AccessChain 315(input.Color) 183
335: 21(fvec3) Load 334
336: 130(ptr) AccessChain 300(input) 183 183
Store 336 335
340: 11(int) Load 339(InvocationID)
Store 337(InvocationID) 340
343: 11(int) Load 342(PrimitiveID)
Store 341(PrimitiveID) 343
346: 40 Load 300(input)
Store 345(param) 346
349: 11(int) Load 337(InvocationID)
Store 348(param) 349
351: 11(int) Load 341(PrimitiveID)
Store 350(param) 351
352: 4 FunctionCall 67(@main(struct-VSOutput-vf4-vf3-vf31[3];struct-GSOutput-vf4-u1-u1-vf3-vf3-vf3-vf31;u1;u1;) 345(param) 347(param) 348(param) 350(param)
353:43(GSOutput) Load 347(param)
Store 344(outStream) 353
Return
FunctionEnd
Line 1 56 1
@ -350,150 +351,150 @@ spv.debuginfo.hlsl.geom
64(outStream): 59(ptr) FunctionParameter
65(InvocationID): 60(ptr) FunctionParameter
66(PrimitiveID): 60(ptr) FunctionParameter
70: Label
94(i): 93(ptr) Variable Function
117(output): 59(ptr) Variable Function
189(pos): 188(ptr) Variable Function
198(worldPos): 188(ptr) Variable Function
209(lPos): 129(ptr) Variable Function
71: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 69
72: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 16 16 16 16
75: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 73 63(input) 76
80: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 77 64(outStream) 76
83: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 81 65(InvocationID) 76
85: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 84 66(PrimitiveID) 76
86: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 69 67(@main(struct-VSOutput-vf4-vf3-vf31[3];struct-GSOutput-vf4-u1-u1-vf3-vf3-vf3-vf31;u1;u1;)
87: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 69
88: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 89 89 16 16
97: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 95 94(i) 76
Store 94(i) 98
Branch 99
99: Label
103: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 69
104: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 89 89 16 16
LoopMerge 101 102 None
Branch 105
105: Label
106: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 69
107: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 89 89 16 16
108: 90(int) Load 94(i)
113: 110(bool) SLessThan 108 109
BranchConditional 113 100 101
100: Label
114: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 69
115: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 116 116 16 16
120: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 118 117(output) 76
Store 117(output) 124
125: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 126 126 16 16
127: 90(int) Load 94(i)
130: 129(ptr) AccessChain 63(input) 127 128
131: 21(fvec3) Load 130
163: 11(int) Load 65(InvocationID)
165: 164(ptr) AccessChain 160 98 128 163
166: 132 Load 165
169: 18(fvec4) CompositeExtract 166 0
170: 21(fvec3) VectorShuffle 169 169 0 1 2
171: 18(fvec4) CompositeExtract 166 1
172: 21(fvec3) VectorShuffle 171 171 0 1 2
173: 18(fvec4) CompositeExtract 166 2
174: 21(fvec3) VectorShuffle 173 173 0 1 2
175: 167 CompositeConstruct 170 172 174
176: 21(fvec3) VectorTimesMatrix 131 175
177: 129(ptr) AccessChain 117(output) 109
Store 177 176
178: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 179 179 16 16
181: 90(int) Load 94(i)
183: 129(ptr) AccessChain 63(input) 181 182
184: 21(fvec3) Load 183
185: 129(ptr) AccessChain 117(output) 180
Store 185 184
186: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 187 187 16 16
192: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 190 189(pos) 76
193: 90(int) Load 94(i)
194: 188(ptr) AccessChain 63(input) 193 98
195: 18(fvec4) Load 194
Store 189(pos) 195
196: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 197 197 16 16
201: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 199 198(worldPos) 76
202: 18(fvec4) Load 189(pos)
203: 11(int) Load 65(InvocationID)
204: 164(ptr) AccessChain 160 98 128 203
205: 132 Load 204
206: 18(fvec4) VectorTimesMatrix 202 205
Store 198(worldPos) 206
207: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 208 208 16 16
212: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 210 209(lPos) 76
214: 213(ptr) AccessChain 160 98 182
215: 18(fvec4) Load 214
216: 11(int) Load 65(InvocationID)
217: 164(ptr) AccessChain 160 98 128 216
218: 132 Load 217
219: 18(fvec4) VectorTimesMatrix 215 218
220: 21(fvec3) VectorShuffle 219 219 0 1 2
Store 209(lPos) 220
221: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 222 222 16 16
224: 21(fvec3) Load 209(lPos)
225: 18(fvec4) Load 198(worldPos)
226: 21(fvec3) VectorShuffle 225 225 0 1 2
227: 21(fvec3) FSub 224 226
228: 129(ptr) AccessChain 117(output) 223
Store 228 227
229: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 230 230 16 16
232: 18(fvec4) Load 198(worldPos)
233: 21(fvec3) VectorShuffle 232 232 0 1 2
234: 21(fvec3) FNegate 233
235: 129(ptr) AccessChain 117(output) 231
Store 235 234
236: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 237 237 16 16
238: 18(fvec4) Load 198(worldPos)
239: 11(int) Load 65(InvocationID)
240: 164(ptr) AccessChain 160 98 98 239
241: 132 Load 240
242: 18(fvec4) VectorTimesMatrix 238 241
243: 188(ptr) AccessChain 117(output) 98
Store 243 242
244: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 245 245 16 16
246: 11(int) Load 65(InvocationID)
247: 60(ptr) AccessChain 117(output) 128
Store 247 246
248: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 249 249 16 16
250: 11(int) Load 66(PrimitiveID)
251: 60(ptr) AccessChain 117(output) 182
Store 251 250
252: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 253 253 16 16
258: 188(ptr) AccessChain 117(output) 98
259: 18(fvec4) Load 258
Store 255(outStream.Pos) 259
264: 60(ptr) AccessChain 117(output) 128
265: 11(int) Load 264
Store 261(outStream.ViewportIndex) 265
269: 60(ptr) AccessChain 117(output) 182
270: 11(int) Load 269
Store 266(outStream.PrimitiveID) 270
275: 129(ptr) AccessChain 117(output) 109
276: 21(fvec3) Load 275
Store 272(outStream.Normal) 276
280: 129(ptr) AccessChain 117(output) 180
281: 21(fvec3) Load 280
Store 277(outStream.Color) 281
285: 129(ptr) AccessChain 117(output) 231
286: 21(fvec3) Load 285
Store 282(outStream.ViewVec) 286
290: 129(ptr) AccessChain 117(output) 223
291: 21(fvec3) Load 290
Store 287(outStream.LightVec) 291
68: Label
95(i): 94(ptr) Variable Function
118(output): 59(ptr) Variable Function
190(pos): 189(ptr) Variable Function
199(worldPos): 189(ptr) Variable Function
210(lPos): 130(ptr) Variable Function
72: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 70
73: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 71 71 16 16
76: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 74 63(input) 77
81: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 78 64(outStream) 77
84: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 82 65(InvocationID) 77
86: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 85 66(PrimitiveID) 77
87: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 70 67(@main(struct-VSOutput-vf4-vf3-vf31[3];struct-GSOutput-vf4-u1-u1-vf3-vf3-vf3-vf31;u1;u1;)
88: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 70
89: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 90 90 16 16
98: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 96 95(i) 77
Store 95(i) 99
Branch 100
100: Label
104: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 70
105: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 90 90 16 16
LoopMerge 102 103 None
Branch 106
106: Label
107: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 70
108: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 90 90 16 16
109: 91(int) Load 95(i)
114: 111(bool) SLessThan 109 110
BranchConditional 114 101 102
101: Label
115: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 70
116: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 117 117 16 16
121: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 119 118(output) 77
Store 118(output) 125
126: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 127 127 16 16
128: 91(int) Load 95(i)
131: 130(ptr) AccessChain 63(input) 128 129
132: 21(fvec3) Load 131
164: 11(int) Load 65(InvocationID)
166: 165(ptr) AccessChain 161 99 129 164
167: 133 Load 166
170: 18(fvec4) CompositeExtract 167 0
171: 21(fvec3) VectorShuffle 170 170 0 1 2
172: 18(fvec4) CompositeExtract 167 1
173: 21(fvec3) VectorShuffle 172 172 0 1 2
174: 18(fvec4) CompositeExtract 167 2
175: 21(fvec3) VectorShuffle 174 174 0 1 2
176: 168 CompositeConstruct 171 173 175
177: 21(fvec3) VectorTimesMatrix 132 176
178: 130(ptr) AccessChain 118(output) 110
Store 178 177
179: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 180 180 16 16
182: 91(int) Load 95(i)
184: 130(ptr) AccessChain 63(input) 182 183
185: 21(fvec3) Load 184
186: 130(ptr) AccessChain 118(output) 181
Store 186 185
187: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 188 188 16 16
193: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 191 190(pos) 77
194: 91(int) Load 95(i)
195: 189(ptr) AccessChain 63(input) 194 99
196: 18(fvec4) Load 195
Store 190(pos) 196
197: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 198 198 16 16
202: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 200 199(worldPos) 77
203: 18(fvec4) Load 190(pos)
204: 11(int) Load 65(InvocationID)
205: 165(ptr) AccessChain 161 99 129 204
206: 133 Load 205
207: 18(fvec4) VectorTimesMatrix 203 206
Store 199(worldPos) 207
208: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 209 209 16 16
213: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 211 210(lPos) 77
215: 214(ptr) AccessChain 161 99 183
216: 18(fvec4) Load 215
217: 11(int) Load 65(InvocationID)
218: 165(ptr) AccessChain 161 99 129 217
219: 133 Load 218
220: 18(fvec4) VectorTimesMatrix 216 219
221: 21(fvec3) VectorShuffle 220 220 0 1 2
Store 210(lPos) 221
222: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 223 223 16 16
225: 21(fvec3) Load 210(lPos)
226: 18(fvec4) Load 199(worldPos)
227: 21(fvec3) VectorShuffle 226 226 0 1 2
228: 21(fvec3) FSub 225 227
229: 130(ptr) AccessChain 118(output) 224
Store 229 228
230: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 231 231 16 16
233: 18(fvec4) Load 199(worldPos)
234: 21(fvec3) VectorShuffle 233 233 0 1 2
235: 21(fvec3) FNegate 234
236: 130(ptr) AccessChain 118(output) 232
Store 236 235
237: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 238 238 16 16
239: 18(fvec4) Load 199(worldPos)
240: 11(int) Load 65(InvocationID)
241: 165(ptr) AccessChain 161 99 99 240
242: 133 Load 241
243: 18(fvec4) VectorTimesMatrix 239 242
244: 189(ptr) AccessChain 118(output) 99
Store 244 243
245: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 246 246 16 16
247: 11(int) Load 65(InvocationID)
248: 60(ptr) AccessChain 118(output) 129
Store 248 247
249: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 250 250 16 16
251: 11(int) Load 66(PrimitiveID)
252: 60(ptr) AccessChain 118(output) 183
Store 252 251
253: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 254 254 16 16
259: 189(ptr) AccessChain 118(output) 99
260: 18(fvec4) Load 259
Store 256(outStream.Pos) 260
265: 60(ptr) AccessChain 118(output) 129
266: 11(int) Load 265
Store 262(outStream.ViewportIndex) 266
270: 60(ptr) AccessChain 118(output) 183
271: 11(int) Load 270
Store 267(outStream.PrimitiveID) 271
276: 130(ptr) AccessChain 118(output) 110
277: 21(fvec3) Load 276
Store 273(outStream.Normal) 277
281: 130(ptr) AccessChain 118(output) 181
282: 21(fvec3) Load 281
Store 278(outStream.Color) 282
286: 130(ptr) AccessChain 118(output) 232
287: 21(fvec3) Load 286
Store 283(outStream.ViewVec) 287
291: 130(ptr) AccessChain 118(output) 224
292: 21(fvec3) Load 291
Store 288(outStream.LightVec) 292
EmitVertex
Branch 102
102: Label
292: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 69
293: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 89 89 16 16
294: 90(int) Load 94(i)
295: 90(int) IAdd 294 128
Store 94(i) 295
Branch 99
101: Label
296: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 69
297: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 298 298 16 16
Branch 103
103: Label
293: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 70
294: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 90 90 16 16
295: 91(int) Load 95(i)
296: 91(int) IAdd 295 129
Store 95(i) 296
Branch 100
102: Label
297: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 70
298: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 299 299 16 16
EndPrimitive
Return
FunctionEnd