summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-11-24 03:04:09 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-11-24 10:40:33 +0000
commit11e0b456de93dae9f7ba4298d8a32b6b60edc503 (patch)
treeadd60d411df9558162340ec877670062d1815afa
parenta44663af9335136cba59b12078c6717992283b62 (diff)
sna/gen5: Use the BLT rather than flush when copying
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/gen5_render.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/sna/gen5_render.c b/src/sna/gen5_render.c
index 36f236f4..54f5d68b 100644
--- a/src/sna/gen5_render.c
+++ b/src/sna/gen5_render.c
@@ -2471,8 +2471,17 @@ gen5_render_copy_boxes(struct sna *sna, uint8_t alu,
if (!kgem_check_bo(&sna->kgem, dst_bo, src_bo, NULL))
kgem_submit(&sna->kgem);
- if (kgem_bo_is_dirty(src_bo))
+ if (kgem_bo_is_dirty(src_bo)) {
+ if (sna_blt_compare_depth(&src->drawable, &dst->drawable) &&
+ sna_blt_copy_boxes(sna, alu,
+ src_bo, src_dx, src_dy,
+ dst_bo, dst_dx, dst_dy,
+ dst->drawable.bitsPerPixel,
+ box, n))
+ return TRUE;
+
kgem_emit_flush(&sna->kgem);
+ }
gen5_copy_bind_surfaces(sna, &tmp);
gen5_align_vertex(sna, &tmp);