xserver: Branch 'master' - 2 commits

Keith Packard keithp at kemper.freedesktop.org
Tue Apr 22 15:05:40 PDT 2014


 glamor/glamor_core.c   |    2 +-
 glamor/glamor_render.c |   10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

New commits:
commit e924034269532979f1e88947ee9c33d30461edae
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Apr 21 10:56:38 2014 -0700

    glamor: Fix accelerated rendering of GTK's ARGB vs xBGR composites.
    
    There is some complicated code to support tweaking the format as we
    upload from a SHM pixmap (aka the GTK icon cache), but if we weren't
    sourcing from a SHM pixmap we just forgot to check that the formats
    matched at all.
    
    We could potentially be a little more discerning here (xRGB source and
    ARGB mask would be fine, for example), but this will all change with
    texture views anyway, so just get the rendering working for 1.16
    release.
    
    Fixes the new rendercheck gtk_argb_xbgr test.
    
    v2: Squash in keithp's fix for checking that we have a non-NULL
        pixmap, and reword the comment even more.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Reviewed-by: Keith Packard <keithp at keithp.com>

diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c
index cdf8eff..2f3d950 100644
--- a/glamor/glamor_render.c
+++ b/glamor/glamor_render.c
@@ -1038,6 +1038,16 @@ glamor_composite_choose_shader(CARD8 op,
     }
 #endif
 
+    /* If the source and mask are two differently-formatted views of
+     * the same pixmap bits, and the pixmap was already uploaded (so
+     * the dynamic code above doesn't apply), then fall back to
+     * software.  We should use texture views to fix this properly.
+     */
+    if (source_pixmap && source_pixmap == mask_pixmap &&
+        source->format != mask->format) {
+        goto fail;
+    }
+
     /*Before enter the rendering stage, we need to fixup
      * transformed source and mask, if the transform is not int translate. */
     if (key.source != SHADER_SOURCE_SOLID
commit 4bbee6761d49478fa40ec5daa2797f13ae96ce5c
Author: Jamey Sharp <jamey at minilop.net>
Date:   Fri Apr 18 09:31:09 2014 -0700

    Make glamor build with --enable-debug.
    
    Bad anholt, no biscuit. Broken in commit
    4c9a20072552c52b3763bd73e7a7e9b9cb8b4993.
    
    Signed-off-by: Jamey Sharp <jamey at minilop.net>
    Cc: Eric Anholt <eric at anholt.net>
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Reviewed-by: Eric Anholt <eric at anholt.net>

diff --git a/glamor/glamor_core.c b/glamor/glamor_core.c
index 7b1615d..5b341d3 100644
--- a/glamor/glamor_core.c
+++ b/glamor/glamor_core.c
@@ -127,7 +127,7 @@ glamor_prepare_access(DrawablePtr drawable, glamor_access_t access)
          */
         assert(!GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv) ||
                access == GLAMOR_ACCESS_RO ||
-               pixmap_priv->base.mapped_for_write);
+               pixmap_priv->base.map_access == GLAMOR_ACCESS_RW);
         return TRUE;
     }
     pixmap_priv->base.map_access = access;


More information about the xorg-commit mailing list