summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-02-11 13:31:12 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-02-11 13:34:44 +0000
commitc64ebee5fdccf313cbd3c73850e02e6fa7dd2a65 (patch)
treeeb87d721ece2fc7736abe594f2c7e8d68d83e9bc
parent6a9b50177408c919ed5c6c2463f687476af2c698 (diff)
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 <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/gen6_render.c2
1 files changed, 1 insertions, 1 deletions
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));
}