From: Yuanhan Liu Date: Wed, 9 Nov 2011 06:55:53 +0000 (+0800) Subject: ir_to_mesa: don't init unfirom if link failed X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9d4d9d34d82646e4e7781bb25a64174d35680578;p=mesa.git ir_to_mesa: don't init unfirom if link failed 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 Reviewed-by: Paul Berry --- diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 0dd44bd7922..5cee8377811 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -3458,7 +3458,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) {