Add D3D11 driver support for ReloadShaderDebugInformation()

This commit is contained in:
Jake Turner
2026-02-05 06:58:26 +13:00
parent 51cff2e71b
commit 88c8de7841
2 changed files with 28 additions and 0 deletions
@@ -146,6 +146,31 @@ void WrappedShader::ShaderEntry::BuildReflection()
}
}
void WrappedShader::ReloadShaderDebugInformation()
{
SCOPED_LOCK(m_ShaderListLock);
for(auto it = m_ShaderList.begin(); it != m_ShaderList.end(); ++it)
{
if(ResourceIDGen::IsReplayOnlyID(it->first))
continue;
it->second->Reload();
}
}
void WrappedShader::ShaderEntry::Reload()
{
m_Built = false;
*m_Details = ShaderReflection();
m_Access.clear();
if(m_Bytecode.empty() && m_DXBCFile)
{
m_Bytecode = m_DXBCFile->GetInitialShaderBob();
if(m_Bytecode.empty())
m_Bytecode = m_DXBCFile->GetShaderBlob();
}
SAFE_DELETE(m_DXBCFile);
}
UINT GetSubresourceCount(ID3D11Resource *res)
{
D3D11_RESOURCE_DIMENSION dim;
+3
View File
@@ -1025,6 +1025,7 @@ public:
private:
void BuildReflection();
void Reload();
ResourceId m_ID;
@@ -1096,6 +1097,8 @@ public:
return m_ShaderList[m_ID]->GetDescriptorAccess();
}
static void ReloadShaderDebugInformation();
static void GetReflections(rdcarray<const ShaderReflection *> &refls)
{
SCOPED_LOCK(m_ShaderListLock);