[Mesa-dev] [PATCH] mesa: Don't call _mesa_ClipControl from glPopAttrib when unsupported.

Jason Ekstrand jason at jlekstrand.net
Mon Nov 3 20:39:27 PST 2014


Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>

On Mon, Nov 3, 2014 at 6:18 PM, Kenneth Graunke <kenneth at whitecape.org>
wrote:

> Otherwise, calling glPopAttrib on drivers that don't support
> ARB_clip_control gives you a GL error, which is surprising at best.
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
>  src/mesa/main/attrib.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
> index 5345339..4684615 100644
> --- a/src/mesa/main/attrib.c
> +++ b/src/mesa/main/attrib.c
> @@ -1345,7 +1345,8 @@ _mesa_PopAttrib(void)
>                 if (xform->DepthClamp != ctx->Transform.DepthClamp)
>                    _mesa_set_enable(ctx, GL_DEPTH_CLAMP,
>                                     ctx->Transform.DepthClamp);
> -               _mesa_ClipControl(xform->ClipOrigin, xform->ClipDepthMode);
> +               if (ctx->Extensions.ARB_clip_control)
> +                  _mesa_ClipControl(xform->ClipOrigin,
> xform->ClipDepthMode);
>              }
>              break;
>           case GL_TEXTURE_BIT:
> --
> 2.1.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20141103/ab3014fe/attachment.html>


More information about the mesa-dev mailing list