xf86-video-intel: 2 commits - src/sna/gen5_render.c src/sna/sna_composite.c src/sna/sna_trapezoids.c

Chris Wilson ickle at kemper.freedesktop.org
Thu Jun 28 09:06:46 PDT 2012


 src/sna/gen5_render.c    |    6 +++---
 src/sna/sna_composite.c  |    3 +--
 src/sna/sna_trapezoids.c |   15 ++++++++++++---
 3 files changed, 16 insertions(+), 8 deletions(-)

New commits:
commit 31caa43a21a68174386682fd558c911c7c03d76f
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Jun 28 17:05:46 2012 +0100

    sna/gen5: Check harder for need_upload() fallbacks
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/gen5_render.c b/src/sna/gen5_render.c
index 0fd51d0..46a37a0 100644
--- a/src/sna/gen5_render.c
+++ b/src/sna/gen5_render.c
@@ -2192,7 +2192,7 @@ untransformed(PicturePtr p)
 static bool
 need_upload(PicturePtr p)
 {
-	return p->pDrawable && unattached(p->pDrawable) && untransformed(p);
+	return p->pDrawable && untransformed(p) && is_cpu(p->pDrawable);
 }
 
 static bool
@@ -2304,7 +2304,7 @@ gen5_composite_fallback(struct sna *sna,
 		return TRUE;
 	}
 
-	if (mask && mask_fallback) {
+	if (mask_fallback) {
 		DBG(("%s: dst is on the CPU and mask will fallback\n",
 		     __FUNCTION__));
 		return TRUE;
@@ -2422,7 +2422,7 @@ gen5_render_composite(struct sna *sna,
 		return FALSE;
 	}
 
-	if (mask == NULL && sna->kgem.mode == KGEM_BLT  &&
+	if (mask == NULL && sna->kgem.mode == KGEM_BLT &&
 	    sna_blt_composite(sna, op,
 			      src, dst,
 			      src_x, src_y,
diff --git a/src/sna/sna_composite.c b/src/sna/sna_composite.c
index c14af3c..4941477 100644
--- a/src/sna/sna_composite.c
+++ b/src/sna/sna_composite.c
@@ -526,7 +526,6 @@ sna_composite(CARD8 op,
 			pixman_region_translate(&region, -x, -y);
 	}
 
-	memset(&tmp, 0, sizeof(tmp));
 	if (!sna->render.composite(sna,
 				   op, src, mask, dst,
 				   src_x + dx,  src_y + dy,
@@ -535,7 +534,7 @@ sna_composite(CARD8 op,
 				   region.extents.y1,
 				   region.extents.x2 - region.extents.x1,
 				   region.extents.y2 - region.extents.y1,
-				   &tmp)) {
+				   memset(&tmp, 0, sizeof(tmp)))) {
 		DBG(("%s: fallback due unhandled composite op\n", __FUNCTION__));
 		goto fallback;
 	}
commit 7c3eb1fda9e567a300a8138acdac9ec11e010b11
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Jun 28 17:04:26 2012 +0100

    sna: Correct inverted logic for checking xrgb drawables
    
    Reported-by: Christoph Reiter <reiter.christoph at gmail.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51472
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_trapezoids.c b/src/sna/sna_trapezoids.c
index 92be480..a591672 100644
--- a/src/sna/sna_trapezoids.c
+++ b/src/sna/sna_trapezoids.c
@@ -3175,6 +3175,9 @@ composite_unaligned_boxes_inplace__solid(CARD8 op, uint32_t color,
 	PixmapPtr pixmap;
 	int16_t dx, dy;
 
+	DBG(("%s: force=%d, is_gpu=%d, op=%d, color=%x\n", __FUNCTION__,
+	     force_fallback, is_gpu(dst->pDrawable), op, color));
+
 	if (!force_fallback && is_gpu(dst->pDrawable)) {
 		DBG(("%s: fallback -- can not perform operation in place, destination busy\n",
 		     __FUNCTION__));
@@ -3183,7 +3186,7 @@ composite_unaligned_boxes_inplace__solid(CARD8 op, uint32_t color,
 	}
 
 	/* XXX a8 boxes */
-	if (dst->format == PICT_a8r8g8b8 || dst->format == PICT_x8r8g8b8) {
+	if (!(dst->format == PICT_a8r8g8b8 || dst->format == PICT_x8r8g8b8)) {
 		DBG(("%s: fallback -- can not perform operation in place, unhanbled format %08lx\n",
 		     __FUNCTION__, dst->format));
 		goto pixman;
@@ -3209,6 +3212,7 @@ composite_unaligned_boxes_inplace__solid(CARD8 op, uint32_t color,
 		goto pixman;
 	}
 
+	DBG(("%s: inplace operation on argb32 destination\n", __FUNCTION__));
 	do {
 		RegionRec clip;
 		BoxPtr extents;
@@ -3420,6 +3424,8 @@ composite_unaligned_boxes_inplace(CARD8 op,
 		return false;
 	}
 
+	DBG(("%s\n", __FUNCTION__));
+
 	src_x -= pixman_fixed_to_int(t[0].left.p1.x);
 	src_y -= pixman_fixed_to_int(t[0].left.p1.y);
 	do {
@@ -3649,7 +3655,8 @@ composite_unaligned_boxes(struct sna *sna,
 	if (NO_UNALIGNED_BOXES)
 		return false;
 
-	DBG(("%s\n", __FUNCTION__));
+	DBG(("%s: force_fallback=%d, mask=%x, n=%d\n",
+	     __FUNCTION__, force_fallback, maskFormat ? (int)maskFormat->format : 0, ntrap));
 
 	/* need a span converter to handle overlapping traps */
 	if (ntrap > 1 && maskFormat)
@@ -5330,7 +5337,7 @@ sna_composite_trapezoids(CARD8 op,
 		goto fallback;
 	}
 
-	force_fallback = FORCE_FALLBACK;
+	force_fallback = FORCE_FALLBACK > 0;
 	if ((too_small(priv) || DAMAGE_IS_ALL(priv->cpu_damage)) &&
 	    !picture_is_gpu(src)) {
 		DBG(("%s: force fallbacks -- dst is too small, %dx%d\n",
@@ -5339,6 +5346,8 @@ sna_composite_trapezoids(CARD8 op,
 		     dst->pDrawable->height));
 		force_fallback = true;
 	}
+	if (FORCE_FALLBACK < 0)
+		force_fallback = false;
 
 	/* scan through for fast rectangles */
 	rectilinear = pixel_aligned = true;


More information about the xorg-commit mailing list