summaryrefslogtreecommitdiff
path: root/src/sna/gen6_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-06-17 10:50:31 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-06-17 10:59:55 +0100
commit41aff56a1f452e409c7a49512a1d2824b74f3838 (patch)
tree6d0049fc2699b7ac97a8ea783df1610ea4ec4740 /src/sna/gen6_render.c
parent222e6ff43ef683e82101fb360911fc01fbe00597 (diff)
sna: Add tiling for spans
Semmingly only advisable when already committed to using the GPU. This first pass is still a little naive as it makes no attempt to avoid empty tiles, nor aims to be efficient. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen6_render.c')
-rw-r--r--src/sna/gen6_render.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c
index d613fe16..b927d08e 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -3088,12 +3088,24 @@ gen6_render_composite_spans(struct sna *sna,
if (op >= ARRAY_SIZE(gen6_blend_op))
return FALSE;
- if (need_tiling(sna, width, height))
- return FALSE;
-
if (gen6_composite_fallback(sna, src, NULL, dst))
return FALSE;
+ if (need_tiling(sna, width, height)) {
+ DBG(("%s: tiling, operation (%dx%d) too wide for pipeline\n",
+ __FUNCTION__, width, height));
+
+ if (!is_gpu(dst->pDrawable)) {
+ DBG(("%s: fallback, tiled operation not on GPU\n",
+ __FUNCTION__));
+ return FALSE;
+ }
+
+ return sna_tiling_composite_spans(op, src, dst,
+ src_x, src_y, dst_x, dst_y,
+ width, height, flags, tmp);
+ }
+
tmp->base.op = op;
if (!gen6_composite_set_target(sna, &tmp->base, dst))
return FALSE;