We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5703e32 commit ce895a1Copy full SHA for ce895a1
renderdoc/driver/shaders/dxil/dxil_debuginfo.cpp
@@ -415,11 +415,19 @@ rdcstr Program::GetDebugVarName(const DIBase *d) const
415
416
rdcstr Program::GetFunctionScopeName(const DIBase *d) const
417
{
418
+ if(d->type == DIBase::Subprogram)
419
+ {
420
+ const rdcstr *name = d->As<DISubprogram>()->name;
421
+ return name ? *name : "";
422
+ }
423
+
424
const Metadata *scope = NULL;
425
if(d->type == DIBase::LocalVariable)
426
scope = d->As<DILocalVariable>()->scope;
- if(d->type == DIBase::GlobalVariable)
427
+ else if(d->type == DIBase::GlobalVariable)
428
scope = d->As<DIGlobalVariable>()->scope;
429
+ else if(d->type == DIBase::LexicalBlock)
430
+ scope = d->As<DILexicalBlock>()->scope;
431
432
while(scope && scope->dwarf)
433
0 commit comments