mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 01:20:42 +00:00
Add D3D11 driver support for ReloadShaderDebugInformation()
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user