On 9 November 2011 01:10, Yuanhan Liu <yuanhan....@linux.intel.com> wrote:
> 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....@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 > > Reviewed-by: Paul Berry <stereotype...@gmail.com>
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev