Add DXIL callstack generation handling for DIBase::Namespace

This commit is contained in:
Jake Turner
2025-07-21 14:43:46 +01:00
parent fa1a7b35cd
commit a120fc0871
2 changed files with 13 additions and 1 deletions
+11 -1
View File
@@ -9084,7 +9084,17 @@ ShaderDebugTrace *Debugger::BeginDebug(uint32_t eventId, const DXBC::DXBCContain
}
}
scopeMD = compType->scope;
break;
}
else if(dwarf->type == DIBase::Namespace)
{
const DINamespace *nameType = dwarf->As<DINamespace>();
const rdcstr *typeName = nameType->name;
if(typeName && !typeName->empty())
{
if(!callstack.empty())
callstack[0] = *typeName + "::" + callstack[0];
}
scopeMD = nameType->scope;
}
else
{
@@ -290,6 +290,8 @@ const Metadata *Program::GetDebugScopeParent(const DIBase *d) const
return d->As<DILexicalBlock>()->scope;
else if(d->type == DIBase::CompositeType)
return d->As<DICompositeType>()->file;
else if(d->type == DIBase::Namespace)
return d->As<DINamespace>()->file;
return NULL;
}