[Mesa-dev] [PATCH 07/12] glsl/linker: skip inactive explicit locations.

Dave Airlie airlied at gmail.com
Mon May 23 00:52:37 UTC 2016


From: Dave Airlie <airlied at redhat.com>

This fixes a crash in:
GL45-CTS.explicit_uniform_location.subroutine-loc-negative-link-max-num-of-locations

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/compiler/glsl/linker.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 4c567fc..2374c01 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)
-- 
2.5.5



More information about the mesa-dev mailing list