summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-05-18 17:06:41 +1000
committerDave Airlie <airlied@redhat.com>2016-05-23 16:19:57 +1000
commit93b3b6af3cafa7d17c2253a91168955fd53dafe4 (patch)
tree3bf07276644139ab745c2ac5c70b9c42b515fb49 /src
parentc714731653fb40d4e20cdfc98c3a200e836e2a21 (diff)
glsl/linker: skip inactive explicit locations.
This fixes a crash in: GL45-CTS.explicit_uniform_location.subroutine-loc-negative-link-max-num-of-locations Reviewed-by: Chris Forbes <chrisforbes@google.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/compiler/glsl/linker.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 4c567fca549..2374c013c15 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -3088,6 +3088,9 @@ link_calculate_subroutine_compat(struct gl_shader_program *prog)
continue;
for (unsigned j = 0; j < sh->NumSubroutineUniformRemapTable; j++) {
+ if (sh->SubroutineUniformRemapTable[j] == INACTIVE_UNIFORM_EXPLICIT_LOCATION)
+ continue;
+
struct gl_uniform_storage *uni = sh->SubroutineUniformRemapTable[j];
if (!uni)