Deduplicate resource accesses by binding not by name

* For D3D this should be equivalent since name == bindpoint, but for SPIR-V this
  prevents the same binding being loaded into multiple SSA variables from being
  added every time.
This commit is contained in:
baldurk
2020-04-29 15:40:43 +01:00
parent fe882fe872
commit 2865fe101d
+1 -1
View File
@@ -1797,7 +1797,7 @@ void ShaderViewer::applyForwardsChange()
bool found = false;
for(size_t i = 0; i < m_AccessedResources.size(); i++)
{
if(c.after.name == m_AccessedResources[i].name)
if(c.after.GetBinding() == m_AccessedResources[i].GetBinding())
{
found = true;
break;