mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-27 20:31:02 +00:00
Added prototype of DXIL Source Variable Debug Data
This commit is contained in:
@@ -1536,6 +1536,14 @@ class Program : public DXBC::IDebugInfo
|
||||
{
|
||||
friend DXILDebug::Debugger;
|
||||
friend DXILDebug::ThreadState;
|
||||
|
||||
struct LocalSourceVariable
|
||||
{
|
||||
uint32_t startInst;
|
||||
uint32_t endInst;
|
||||
rdcarray<SourceVariableMapping> sourceVars;
|
||||
};
|
||||
|
||||
public:
|
||||
Program(const byte *bytes, size_t length);
|
||||
Program(const Program &o) = delete;
|
||||
@@ -1681,6 +1689,7 @@ protected:
|
||||
std::map<rdcstr, size_t> m_ResourceHandles;
|
||||
std::map<rdcstr, rdcstr> m_SsaAliases;
|
||||
std::map<rdcstr, uint32_t> m_ResourceAnnotateCounts;
|
||||
rdcarray<LocalSourceVariable> m_Locals;
|
||||
|
||||
rdcarray<ResourceReference> m_ResourceReferences;
|
||||
rdcstr m_Disassembly;
|
||||
|
||||
@@ -1760,6 +1760,16 @@ void Program::GetLocals(const DXBC::DXBCContainer *dxbc, size_t instruction, uin
|
||||
rdcarray<SourceVariableMapping> &locals) const
|
||||
{
|
||||
locals.clear();
|
||||
|
||||
for(const LocalSourceVariable &localVar : m_Locals)
|
||||
{
|
||||
if(localVar.startInst > instruction)
|
||||
continue;
|
||||
if(instruction > localVar.endInst)
|
||||
continue;
|
||||
|
||||
locals.append(localVar.sourceVars);
|
||||
}
|
||||
}
|
||||
|
||||
const ResourceReference *Program::GetResourceReference(const rdcstr &handleStr) const
|
||||
|
||||
Reference in New Issue
Block a user