From c64ebee5fdccf313cbd3c73850e02e6fa7dd2a65 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 11 Feb 2012 13:31:12 +0000 Subject: [PATCH] sna/gen6: Prefer the render ring for copies Slower for fills, but on the current stack faster for copies, both large and small. Hopefully, when we write some good shaders for SNB, we will not only improve performance for copies but also make fills faster on the render ring than the blt? As the BLT copy routine is GPU bound for copywinpix10, and the RENDER copy routine is CPU bound and faster, I believe that we have reached the potential of the BLT ring and not yet saturated the GPU using the render copy. Note that we still do not casually switch rings, so the actual routine chosen will still be selected by the preceeding operations, so is unlikely to have any effect in practice during, for example, cairo-traces. Signed-off-by: Chris Wilson --- src/sna/gen6_render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c index 146a2d10..1e997097 100644 --- a/src/sna/gen6_render.c +++ b/src/sna/gen6_render.c @@ -3167,7 +3167,7 @@ static inline bool prefer_blt_copy(struct sna *sna, PixmapPtr src, struct kgem_bo *src_bo, PixmapPtr dst, struct kgem_bo *dst_bo) { - return (sna->kgem.ring != KGEM_RENDER || + return (sna->kgem.ring == KGEM_BLT || prefer_blt_bo(sna, src, src_bo) || prefer_blt_bo(sna, dst, dst_bo)); }