xserver: Branch 'master'

Keith Packard keithp at kemper.freedesktop.org
Tue Jun 2 08:39:10 PDT 2015


 glamor/glamor_largepixmap.c |    9 +++++++++
 glamor/glamor_render.c      |    9 ++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)

New commits:
commit fa12f2c150b2f50de9dac4a2b09265f13af353af
Author: Dave Airlie <airlied at redhat.com>
Date:   Thu May 28 16:21:37 2015 +1000

    glamor: don't do render ops with matching source/dest (v3)
    
    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.
    
    v2: bump this up a level, and check it earlier.
    (I assume the XXXX was for this case.)
    v3: add same code to largepixmap paths (Keith)
    
    Reviewed-by: Eric Anholt <eric at anholt.net>
    Reviewed-by: Jasper St. Pierre <jstpierre at mecheye.net>
    Signed-off-by: Dave Airlie <airlied at redhat.com>

diff --git a/glamor/glamor_largepixmap.c b/glamor/glamor_largepixmap.c
index 391f376..da3fb61 100644
--- a/glamor/glamor_largepixmap.c
+++ b/glamor/glamor_largepixmap.c
@@ -1055,6 +1055,15 @@ glamor_composite_largepixmap_region(CARD8 op,
     int source_repeat_type = 0, mask_repeat_type = 0;
     int ok = TRUE;
 
+    if (source_pixmap == dest_pixmap) {
+        glamor_fallback("source and dest pixmaps are the same\n");
+        return FALSE;
+    }
+    if (mask_pixmap == dest_pixmap) {
+        glamor_fallback("mask and dest pixmaps are the same\n");
+        return FALSE;
+    }
+
     if (source->repeat)
         source_repeat_type = source->repeatType;
     else
diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c
index efca367..05eee91 100644
--- a/glamor/glamor_render.c
+++ b/glamor/glamor_render.c
@@ -1481,7 +1481,14 @@ glamor_composite_clipped_region(CARD8 op,
         }
     }
 
-    /*XXXXX, self copy? */
+    if (temp_src_pixmap == dest_pixmap) {
+        glamor_fallback("source and dest pixmaps are the same\n");
+        goto out;
+    }
+    if (temp_mask_pixmap == dest_pixmap) {
+        glamor_fallback("mask and dest pixmaps are the same\n");
+        goto out;
+    }
 
     x_dest += dest->pDrawable->x;
     y_dest += dest->pDrawable->y;


More information about the xorg-commit mailing list