xf86-video-intel: src/sna/gen4_render.c

Chris Wilson ickle at kemper.freedesktop.org
Wed Feb 13 14:09:32 PST 2013


 src/sna/gen4_render.c |   17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

New commits:
commit 86e025a1842f3c2f319676818b1f4624cd94ebc5
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Feb 13 22:05:34 2013 +0000

    sna/gen4: Restore nonrectiinear spans workaround
    
    Instead of relying on the macro, the intention was simply to use the
    prefer_gpu hint. However, I dropped it whilst refactoring ideas from
    later generations. So restore both the debug control to force spans as
    well as the intended workaround.
    
    Reported-by: Edward Sheldrake <ejsheldrake at gmail.com>
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c
index 53fe52a..64077a2 100644
--- a/src/sna/gen4_render.c
+++ b/src/sna/gen4_render.c
@@ -2101,19 +2101,24 @@ gen4_check_composite_spans(struct sna *sna,
 		return FORCE_SPANS > 0;
 
 	if ((flags & COMPOSITE_SPANS_RECTILINEAR) == 0) {
-		struct sna_pixmap *priv = sna_pixmap_from_drawable(dst->pDrawable);
+		struct sna_pixmap *priv;
+
+		if (FORCE_NONRECTILINEAR_SPANS)
+			return FORCE_NONRECTILINEAR_SPANS > 0;
+
+		if ((sna->render.prefer_gpu & PREFER_GPU_SPANS) == 0)
+			return false;
+
+		priv = sna_pixmap_from_drawable(dst->pDrawable);
 		assert(priv);
 
-		if (priv->cpu_bo && kgem_bo_is_busy(priv->cpu_bo))
+		if (priv->cpu_bo &&
+		    __kgem_bo_is_busy(&sna->kgem, priv->cpu_bo))
 			return true;
 
 		if (flags & COMPOSITE_SPANS_INPLACE_HINT)
 			return false;
 
-		if ((sna->render.prefer_gpu & PREFER_GPU_SPANS) == 0 &&
-		    dst->format == PICT_a8)
-			return false;
-
 		return priv->gpu_bo && kgem_bo_is_busy(priv->gpu_bo);
 	}
 


More information about the xorg-commit mailing list