diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-02-13 22:05:34 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-02-13 22:08:55 +0000 |
commit | 86e025a1842f3c2f319676818b1f4624cd94ebc5 (patch) | |
tree | 5c7466f924cf0355694c7ce3667433a3d0d46cf9 | |
parent | f2a64dbdfceac985d235c4873f52013633d6cfd8 (diff) |
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@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/gen4_render.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c index 53fe52a9..64077a2d 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); } |