DXIL Program added GetEntryPointInterface()

Returns the parsed entry point metadata (Inputs, Outputs, Resources, etc.)
This commit is contained in:
Jake Turner
2024-11-27 13:21:32 +00:00
parent 2c42c1dac2
commit dbf3569d26
2 changed files with 13 additions and 0 deletions
@@ -1579,6 +1579,7 @@ public:
void FetchEntryPoint();
DXBC::Reflection *BuildReflection();
rdcstr GetDebugStatus();
const DXIL::EntryPointInterface *GetEntryPointInterface() const;
rdcarray<ShaderEntryPoint> GetEntryPoints();
void FillEntryPointInterfaces();
size_t GetInstructionCount() const;
@@ -1439,6 +1439,18 @@ static void AddResourceBind(DXBC::Reflection *refl, const TypeInfo &typeInfo, co
refl->UAVs.push_back(bind);
}
const DXIL::EntryPointInterface *Program::GetEntryPointInterface() const
{
RDCASSERT(!m_EntryPointInterfaces.isEmpty());
for(size_t e = 0; e < m_EntryPointInterfaces.size(); ++e)
{
if(m_EntryPoint == m_EntryPointInterfaces[e].name)
return &m_EntryPointInterfaces[e];
}
RDCERR("Couldn't find entry point interface for %s", m_EntryPoint.c_str());
return NULL;
}
rdcarray<ShaderEntryPoint> Program::GetEntryPoints()
{
rdcarray<ShaderEntryPoint> ret;