Emit correct nonsemantic debug info for explicitly sized types

Previously, the type names in the nonsemantic shader debug info would be
"int", "uint", or "float" for all numeric types. This change makes the
correct names such as "int8_t" or "float16_t" get emitted.
This commit is contained in:
Sajjad Mirza 2023-09-11 17:11:22 -07:00 committed by GitHub
parent b2dc622faf
commit afe6e781bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 390 additions and 127 deletions

View file

@ -11,8 +11,8 @@ spv.debuginfo.hlsl.comp
EntryPoint GLCompute 6 "main" 971
ExecutionMode 6 LocalSize 10 10 1
1: String ""
10: String "float"
13: String "uint"
9: String "float"
12: String "uint"
28: String "springForce"
31: String "// OpModuleProcessed auto-map-locations
// OpModuleProcessed auto-map-bindings
@ -177,15 +177,15 @@ spv.debuginfo.hlsl.comp
14: 11(int) Constant 32
15: 11(int) Constant 6
16: 11(int) Constant 0
12: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 13 14 15 16
13: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 12 14 15 16
17: 11(int) Constant 3
9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 10 14 17 16
10: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 14 17 16
18: TypeVector 8(float) 3
19: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 9 17
19: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 17
20: TypePointer Function 18(fvec3)
21: TypePointer Function 8(float)
22: TypeFunction 18(fvec3) 20(ptr) 20(ptr) 21(ptr)
23: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 19 19 19 9
23: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 19 19 19 10
30: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 31
33: 11(int) Constant 1
34: 11(int) Constant 4
@ -196,9 +196,9 @@ spv.debuginfo.hlsl.comp
42: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression)
45: 11(int) Constant 2
43: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 44 19 30 16 16 29 34 45
47: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 48 9 30 16 16 29 34 17
47: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 48 10 30 16 16 29 34 17
50: TypeVector 11(int) 3
51: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 12 17
51: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 13 17
52: TypePointer Function 50(ivec3)
53: TypeFunction 4 52(ptr)
54: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 4 51
@ -208,7 +208,7 @@ spv.debuginfo.hlsl.comp
70: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 71 19 30 68 16 29 34
77: 11(int) Constant 77
80: TypeVector 8(float) 4
81: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 9 34
81: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 34
82: TypeInt 32 1
84: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 83 14 34 16
85: TypeVector 82(int) 2
@ -216,14 +216,14 @@ spv.debuginfo.hlsl.comp
87(UBO): TypeStruct 8(float) 8(float) 8(float) 8(float) 8(float) 8(float) 8(float) 8(float) 80(fvec4) 80(fvec4) 85(ivec2)
90: 11(int) Constant 48
91: 11(int) Constant 20
88: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 9 30 90 91 16 16 17
92: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 9 30 90 91 16 16 17
93: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 9 30 90 91 16 16 17
94: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 9 30 90 91 16 16 17
95: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 9 30 90 91 16 16 17
96: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 9 30 90 91 16 16 17
97: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 9 30 90 91 16 16 17
98: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 9 30 90 91 16 16 17
88: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 10 30 90 91 16 16 17
92: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 10 30 90 91 16 16 17
93: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 10 30 90 91 16 16 17
94: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 10 30 90 91 16 16 17
95: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 10 30 90 91 16 16 17
96: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 10 30 90 91 16 16 17
97: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 10 30 90 91 16 16 17
98: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 10 30 90 91 16 16 17
101: 11(int) Constant 50
102: 11(int) Constant 16
99: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 100 81 30 101 102 16 16 17
@ -245,7 +245,7 @@ spv.debuginfo.hlsl.comp
122: TypePointer Uniform 8(float)
136: 11(int) Constant 83
137: TypePointer Function 11(int)
139: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 140 12 30 136 16 58 34
139: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 140 13 30 136 16 58 34
144: 82(int) Constant 10
145: TypePointer Uniform 82(int)
154: 11(int) Constant 84
@ -262,7 +262,7 @@ spv.debuginfo.hlsl.comp
182: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 177 81 30 178 179 16 16 17
185: 11(int) Constant 31
186: 11(int) Constant 14
183: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 184 9 30 185 186 16 16 17
183: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 184 10 30 185 186 16 16 17
187: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 188 33 30 174 16 32 188 16 17 176 180 181 182 183
189: TypeRuntimeArray 175(Particle)
190: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 187 16
@ -354,7 +354,7 @@ spv.debuginfo.hlsl.comp
667(PushConstants): TypeStruct 11(int)
670: 11(int) Constant 67
671: 11(int) Constant 23
668: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 669 12 30 670 671 16 16 17
668: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 669 13 30 670 671 16 16 17
672: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 673 33 30 666 16 32 673 16 17 668
674($Global): TypeStruct 667(PushConstants)
677: 11(int) Constant 71