Sanitize debug source location tracking for implicit branch and return

This patch tries to attach debug location of a branch/return instruction to its predecessor or the closing brace. If none could be found, no debug info should be emitted.
This commit is contained in:
Qingyuan Zheng 2024-08-26 03:53:07 +00:00 committed by arcady-lunarg
parent b1fac200c4
commit a496a34b43
30 changed files with 4713 additions and 4253 deletions

View file

@ -1,7 +1,7 @@
spv.debuginfo.bufferref.glsl.frag
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 146
// Id's are bound by 148
Capability Shader
Capability PhysicalStorageBufferAddressesEXT
@ -177,6 +177,7 @@ void main() {
138: 7(int) Constant 27
136: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 137 132 18 138 12 21 137 135(out_fragColor) 67
141: 39(float) Constant 1065353216
147: 7(int) Constant 28
14(main): 4 Function None 5
15: Label
53(meshData): 50(ptr) Variable Function
@ -226,5 +227,6 @@ void main() {
144: 39(float) CompositeExtract 139 2
145: 131(fvec4) CompositeConstruct 142 143 144 141
Store 135(out_fragColor) 145
146: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 147 147 12 12
Return
FunctionEnd