We should check whether check_explicit_uniform_locations has failed before we pass the number of explicit uniform locations to link_assign_uniform_locations.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94549#c3 --- 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 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev