[Mesa-dev] [PATCH] compiler: Check if check_explicit_uniform_locations has failed.
Plamena Manolova
plamena.manolova at intel.com
Fri Mar 18 15:41:11 UTC 2016
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
More information about the mesa-dev
mailing list