From 41aff56a1f452e409c7a49512a1d2824b74f3838 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 17 Jun 2012 10:50:31 +0100 Subject: 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 --- src/sna/gen6_render.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/sna/gen6_render.c') 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; -- cgit v1.2.3