From 0d05a69bd74dc02fb1360c9393de905b8842e1fe Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 11 Sep 2013 10:18:51 +0100 Subject: [PATCH] sna/gen4: Always try the BLT composite routines first Given how fragile the render operations are, taking the hit from transitioning from the slow render operations to the comparatively fast BLT (when possible) is always worth it. Signed-off-by: Chris Wilson --- src/sna/gen4_render.c | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c index fb56d85d..3158b585 100644 --- a/src/sna/gen4_render.c +++ b/src/sna/gen4_render.c @@ -1630,33 +1630,6 @@ gen4_composite_set_target(struct sna *sna, return true; } -static bool -try_blt(struct sna *sna, - PicturePtr dst, PicturePtr src, - int width, int height) -{ - if (sna->kgem.mode != KGEM_RENDER) { - DBG(("%s: already performing BLT\n", __FUNCTION__)); - return true; - } - - if (too_large(width, height)) { - DBG(("%s: operation too large for 3D pipe (%d, %d)\n", - __FUNCTION__, width, height)); - return true; - } - - if (too_large(dst->pDrawable->width, dst->pDrawable->height)) - return true; - - /* The blitter is much faster for solids */ - if (sna_picture_is_solid(src, NULL)) - return true; - - /* is the source picture only in cpu memory e.g. a shm pixmap? */ - return picture_is_cpu(sna, src); -} - static bool check_gradient(PicturePtr picture, bool precise) { @@ -1885,7 +1858,6 @@ gen4_render_composite(struct sna *sna, return false; if (mask == NULL && - try_blt(sna, dst, src, width, height) && sna_blt_composite(sna, op, src, dst, src_x, src_y,