[Mesa-dev] [Bug 60518] glDrawElements segfault when compiled into display list

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri May 31 03:18:31 PDT 2013


https://bugs.freedesktop.org/show_bug.cgi?id=60518

--- Comment #8 from core13 at gmx.net ---
(In reply to comment #7)
> I suspect the problem are these lines in setup_glsl_generate_mipmap():
> 
>    _mesa_BindAttribLocation(mipmap->ShaderProg, 0, "position");
>    _mesa_BindAttribLocation(mipmap->ShaderProg, 1, "texcoords");
>    _mesa_EnableVertexAttribArray(0);
>    _mesa_EnableVertexAttribArray(1);
> 
> Which can be executed without this line being called:
> 
>    _mesa_BindVertexArray(mipmap->ArrayObj);
> 
> This patch might fix this.
> 
> diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
> index ca5f5a1..7da08e8 100644
> --- a/src/mesa/drivers/common/meta.c
> +++ b/src/mesa/drivers/common/meta.c
> @@ -3397,6 +3397,8 @@ setup_glsl_generate_mipmap(struct gl_context *ctx,
>                                     sizeof(struct vertex), OFFSET(x));
>        _mesa_VertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE,
>                                     sizeof(struct vertex), OFFSET(tex));
> +   } else {
> +      _mesa_BindVertexArray(mipmap->ArrayObj);
>     }
>  
>     /* Generate a fragment shader program appropriate for the texture target
> */

Yep, no segfaults with this patch. Tested with mesa git, i965. Thanks, for
looking into this, José.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130531/3f44cc09/attachment-0001.html>


More information about the mesa-dev mailing list