mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 01:20:42 +00:00
DXIL Debugger find the entry point in GetLineInfo
Get entry point from meta data if the entry point is empty
This commit is contained in:
@@ -329,6 +329,12 @@ void MakeShaderReflection(DXBC::DXBCContainer *dxbc, const ShaderEntryPoint &ent
|
||||
|
||||
refl->debugInfo.files = dxbc->GetDebugInfo()->Files;
|
||||
|
||||
// For DXIL ensure the entry point meta data has been parsed
|
||||
if(dxbc->GetDXILByteCode())
|
||||
{
|
||||
dxbc->GetDXILByteCode()->FetchEntryPoint();
|
||||
}
|
||||
|
||||
dxbc->GetDebugInfo()->GetLineInfo(~0U, ~0U, refl->debugInfo.entryLocation);
|
||||
|
||||
rdcstr entryFunc = entry.name;
|
||||
|
||||
@@ -1559,6 +1559,7 @@ public:
|
||||
|
||||
const bytebuf &GetBytes() const { return m_Bytes; }
|
||||
void FetchComputeProperties(DXBC::Reflection *reflection);
|
||||
void FetchEntryPoint();
|
||||
DXBC::Reflection *BuildReflection();
|
||||
rdcstr GetDebugStatus();
|
||||
rdcarray<ShaderEntryPoint> GetEntryPoints();
|
||||
|
||||
@@ -1461,6 +1461,24 @@ rdcarray<ShaderEntryPoint> Program::GetEntryPoints()
|
||||
return ret;
|
||||
}
|
||||
|
||||
void Program::FetchEntryPoint()
|
||||
{
|
||||
if(m_EntryPoint.empty())
|
||||
{
|
||||
DXMeta dx(m_NamedMeta);
|
||||
if(dx.entryPoints && dx.entryPoints->children.size() > 0 &&
|
||||
dx.entryPoints->children[0]->children.size() > 2)
|
||||
{
|
||||
m_EntryPoint = dx.entryPoints->children[0]->children[1]->str;
|
||||
}
|
||||
else
|
||||
{
|
||||
RDCERR("Didn't find dx.entryPoints");
|
||||
m_EntryPoint = "main";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DXBC::Reflection *Program::BuildReflection()
|
||||
{
|
||||
const bool dxcStyleFormatting = m_DXCStyle;
|
||||
|
||||
Reference in New Issue
Block a user