From 23d9a1a5c5e0d12138faa906d686efb6174ce2cb Mon Sep 17 00:00:00 2001 From: Plamena Manolova Date: Wed, 16 Mar 2016 11:43:13 +0200 Subject: [PATCH] compiler: Check if check_explicit_uniform_locations has failed. We should check whether check_explicit_uniform_locations has failed before we pass the number of explicit uniform locations to link_assign_uniform_locations. --- src/compiler/glsl/linker.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index 76b700d..a2091f4 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/linker.cpp @@ -4324,6 +4324,7 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog) goto done; unsigned first, last, prev; + int result; first = MESA_SHADER_STAGES; last = 0; @@ -4337,7 +4338,11 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog) last = i; } - num_explicit_uniform_locs = check_explicit_uniform_locations(ctx, prog); + result = check_explicit_uniform_locations(ctx, prog); + + if (result > 0) + num_explicit_uniform_locs = result; + link_assign_subroutine_types(prog); if (!prog->LinkStatus) -- 2.4.3