From ec583082077fceb64e8b0cb5aec1c1be4ed736e7 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 22 Feb 2019 14:10:25 +0000 Subject: [PATCH] With GL we can have binding aliasing. Keep searching for a used binding * If we have multiple bindings aliasing the same slot, we want to keep going if the first one we find is unused to see if the slot is aliased with one that *is* used. We'll still use the last unused one if we don't find any used at all (and with aliasing any one we pick is as valid as another). --- qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.cpp b/qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.cpp index 07a13bc4a..9b9557176 100644 --- a/qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.cpp +++ b/qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.cpp @@ -922,7 +922,11 @@ void GLPipelineStateViewer::setShaderState(const GLPipe::Shader &stage, RDLabel { shaderCBuf = &bind; map = &mapping.constantBlocks[bind.bindPoint]; - break; + + // if this one is used, break immediately. Otherwise keep going to see if we find one that + // is used + if(map->used) + break; } idx++;