From: Dave Airlie Date: Wed, 18 May 2016 07:06:41 +0000 (+1000) Subject: glsl/linker: skip inactive explicit locations. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=93b3b6af3cafa7d17c2253a91168955fd53dafe4;p=mesa.git 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 Signed-off-by: Dave Airlie --- 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)