[PATCH] glamor: don't do render ops with matching source/dest

Jasper St. Pierre jstpierre at mecheye.net
Thu May 28 10:43:14 PDT 2015


I wonder if we should tell the Qt people about this so they can get
back on the fast path?

In any case, makes sense.

Reviewed-by: Jasper St. Pierre <jstpierre at mecheye.net>

On Wed, May 27, 2015 at 10:31 PM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> XRender defines this, GL really doesn't like it.
>
> kwin 4.x and qt 4.x seem to make this happen for the
> gradient in the titlebar, and on radeonsi/r600 hw
> this draws all kinds of wrong.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  glamor/glamor_render.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c
> index efca367..b3046b4 100644
> --- a/glamor/glamor_render.c
> +++ b/glamor/glamor_render.c
> @@ -1149,6 +1149,14 @@ glamor_composite_with_shader(CARD8 op,
>      glamor_composite_shader *shader = NULL, *shader_ca = NULL;
>      struct blendinfo op_info, op_info_ca;
>
> +    if (source_pixmap == dest_pixmap) {
> +        glamor_fallback("source and dest pixmaps are the same\n");
> +        return ret;
> +    }
> +    if (mask_pixmap == dest_pixmap) {
> +        glamor_fallback("mask and dest pixmaps are the same\n");
> +        return ret;
> +    }
>      if (!glamor_composite_choose_shader(op, source, mask, dest,
>                                          source_pixmap, mask_pixmap, dest_pixmap,
>                                          source_pixmap_priv, mask_pixmap_priv,
> --
> 1.8.3.1
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel



-- 
  Jasper


More information about the xorg-devel mailing list