[Mesa-dev] [PATCH] meta: Only use _mesa_ClipControl if the extension is supported

Jason Ekstrand jason at jlekstrand.net
Fri Oct 24 19:20:28 PDT 2014


Fixes it for me.  Also,

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

Push it!

On Fri, Oct 24, 2014 at 6:08 PM, Ian Romanick <idr at freedesktop.org> wrote:

> From: Ian Romanick <ian.d.romanick at intel.com>
>
> Fixes many piglit failures on IVB since 85edaa8.
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85425
> Cc: Mathias Fröhlich <Mathias.Froehlich at gmx.net>
> Cc: Jason Ekstrand <jason.ekstrand at intel.com>
> ---
>  src/mesa/drivers/common/meta.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/src/mesa/drivers/common/meta.c
> b/src/mesa/drivers/common/meta.c
> index 45c50fd..87532c1 100644
> --- a/src/mesa/drivers/common/meta.c
> +++ b/src/mesa/drivers/common/meta.c
> @@ -681,9 +681,11 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield
> state)
>                       0.0, ctx->DrawBuffer->Height,
>                       -1.0, 1.0);
>
> -      save->ClipOrigin = ctx->Transform.ClipOrigin;
> -      save->ClipDepthMode = ctx->Transform.ClipDepthMode;
> -      _mesa_ClipControl(GL_LOWER_LEFT, GL_NEGATIVE_ONE_TO_ONE);
> +      if (ctx->Extensions.ARB_clip_control) {
> +         save->ClipOrigin = ctx->Transform.ClipOrigin;
> +         save->ClipDepthMode = ctx->Transform.ClipDepthMode;
> +         _mesa_ClipControl(GL_LOWER_LEFT, GL_NEGATIVE_ONE_TO_ONE);
> +      }
>     }
>
>     if (state & MESA_META_CLIP) {
> @@ -1086,7 +1088,8 @@ _mesa_meta_end(struct gl_context *ctx)
>
>        _mesa_MatrixMode(save->MatrixMode);
>
> -      _mesa_ClipControl(save->ClipOrigin, save->ClipDepthMode);
> +      if (ctx->Extensions.ARB_clip_control)
> +         _mesa_ClipControl(save->ClipOrigin, save->ClipDepthMode);
>     }
>
>     if (state & MESA_META_CLIP) {
> --
> 1.8.1.4
>
> _______________________________________________
> 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/20141024/84d217c5/attachment-0001.html>


More information about the mesa-dev mailing list