mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-25 15:16:22 +00:00
Don't fetch resource lists for unbound shader stages
* This is a minor optimisation when there are large numbers of bound resources that are available (duplicated) to all shader stages. There's no point fetching them when there's no shader bound there.
This commit is contained in:
@@ -3116,10 +3116,19 @@ void TextureViewer::OnEventChanged(uint32_t eventId)
|
||||
{
|
||||
ShaderStage stage = stages[i];
|
||||
|
||||
m_ReadWriteResources[(uint32_t)stage] =
|
||||
Following::GetReadWriteResources(m_Ctx, stage, !m_ShowUnused);
|
||||
m_ReadOnlyResources[(uint32_t)stage] =
|
||||
Following::GetReadOnlyResources(m_Ctx, stage, !m_ShowUnused);
|
||||
const ShaderBindpointMapping &mapping = Following::GetMapping(m_Ctx, stage);
|
||||
|
||||
if(!mapping.readOnlyResources.empty())
|
||||
m_ReadOnlyResources[(uint32_t)stage] =
|
||||
Following::GetReadOnlyResources(m_Ctx, stage, !m_ShowUnused);
|
||||
else
|
||||
m_ReadOnlyResources[(uint32_t)stage].clear();
|
||||
|
||||
if(!mapping.readWriteResources.empty())
|
||||
m_ReadWriteResources[(uint32_t)stage] =
|
||||
Following::GetReadWriteResources(m_Ctx, stage, !m_ShowUnused);
|
||||
else
|
||||
m_ReadWriteResources[(uint32_t)stage].clear();
|
||||
}
|
||||
|
||||
UI_UpdateCachedTexture();
|
||||
|
||||
Reference in New Issue
Block a user