Use bindpoint mapping to look up matching shader resources on D3D11

This commit is contained in:
baldurk
2017-11-20 20:01:02 +00:00
parent 217558a3c7
commit 6429d47ee8
@@ -1883,9 +1883,14 @@ void D3D11PipelineStateViewer::resource_itemActivated(RDTreeWidgetItem *item, in
? stage->ShaderDetails->ReadOnlyResources
: stage->ShaderDetails->ReadWriteResources;
const rdcarray<BindpointMap> &bindArray = view.type == D3D11ViewTag::SRV
? stage->BindpointMapping.ReadOnlyResources
: stage->BindpointMapping.ReadWriteResources;
for(const ShaderResource &res : resArray)
{
if(!res.IsTexture && res.bindPoint == bind)
if(!res.IsTexture && res.bindPoint < bindArray.count() &&
bindArray[res.bindPoint].bind == bind)
{
shaderRes = &res;
break;