[Mesa-dev] [PATCH 1/2] ir_to_mesa: don't init unfirom if link failed
Yuanhan Liu
yuanhan.liu at linux.intel.com
Wed Nov 9 01:10:40 PST 2011
Don't call set_unfiform_initializers if link failed, or it would trigger
a GL_INVALID_OPERATION error. That's not an expected behavior of
glLinkProgram function.
Signed-off-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>
---
src/mesa/program/ir_to_mesa.cpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 1b8b48e..b00175b 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -3513,7 +3513,9 @@ _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
}
}
- set_uniform_initializers(ctx, prog);
+ if (prog->LinkStatus) {
+ set_uniform_initializers(ctx, prog);
+ }
if (ctx->Shader.Flags & GLSL_DUMP) {
if (!prog->LinkStatus) {
--
1.7.4.4
More information about the mesa-dev
mailing list