[Mesa-dev] [PATCH 1/2] ir_to_mesa: don't init unfirom if link failed

Paul Berry stereotype441 at gmail.com
Mon Nov 14 09:45:05 PST 2011


On 9 November 2011 01:10, Yuanhan Liu <yuanhan.liu at 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.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
>
>
Reviewed-by: Paul Berry <stereotype441 at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20111114/29ba3e46/attachment.htm>


More information about the mesa-dev mailing list