mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-14 18:00:54 +00:00
ShaderViewer uses GetShaderDebugVariable() when matching resource vars
This matches how debug variables are matched This supports source mapping to resources which are a child member of a ShaderVariable i.e. an array element
This commit is contained in:
1 parent
0bed011093
commit
811c6c6ecc
1 file changed
+3
-15
@@ -5408,27 +5408,15 @@ const ShaderVariable *ShaderViewer::GetDebugVariable(const DebugVariableReferenc
|
||||
{
|
||||
if(r.type == DebugVariableType::ReadOnlyResource)
|
||||
{
|
||||
for(int i = 0; i < m_Trace->readOnlyResources.count(); i++)
|
||||
if(m_Trace->readOnlyResources[i].name == r.name)
|
||||
return &m_Trace->readOnlyResources[i];
|
||||
|
||||
return NULL;
|
||||
return GetShaderDebugVariable(r.name, m_Trace->readOnlyResources);
|
||||
}
|
||||
else if(r.type == DebugVariableType::ReadWriteResource)
|
||||
{
|
||||
for(int i = 0; i < m_Trace->readWriteResources.count(); i++)
|
||||
if(m_Trace->readWriteResources[i].name == r.name)
|
||||
return &m_Trace->readWriteResources[i];
|
||||
|
||||
return NULL;
|
||||
return GetShaderDebugVariable(r.name, m_Trace->readWriteResources);
|
||||
}
|
||||
else if(r.type == DebugVariableType::Sampler)
|
||||
{
|
||||
for(int i = 0; i < m_Trace->samplers.count(); i++)
|
||||
if(m_Trace->samplers[i].name == r.name)
|
||||
return &m_Trace->samplers[i];
|
||||
|
||||
return NULL;
|
||||
return GetShaderDebugVariable(r.name, m_Trace->samplers);
|
||||
}
|
||||
else if(r.type == DebugVariableType::Input)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user