diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-06-13 12:32:12 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-06-13 13:52:41 +0100 |
commit | 97003b1a2d6c8beb5c4df4bece5a2d5b03b5ae2f (patch) | |
tree | d38fe09678894271c5721127eed35065ea0285ef /src/sna/gen8_render.c | |
parent | 87fc78ac4f6bbfa8e9427d392356ee26942bf955 (diff) |
sna/gen6+: Prefer the BLT for large overlapping copies
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen8_render.c')
-rw-r--r-- | src/sna/gen8_render.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/sna/gen8_render.c b/src/sna/gen8_render.c index 7ac883b8..1bde3ad7 100644 --- a/src/sna/gen8_render.c +++ b/src/sna/gen8_render.c @@ -2786,10 +2786,9 @@ fallback_blt: src_bo, src_dx, src_dy, dst_bo, dst_dx, dst_dy, box, n, &extents)) { - if (too_large(extents.x2-extents.x1, extents.y2-extents.y1)) - goto fallback_blt; + bool big = too_large(extents.x2-extents.x1, extents.y2-extents.y1); - if (can_switch_to_blt(sna, dst_bo, flags) && + if ((big || can_switch_to_blt(sna, dst_bo, flags)) && sna_blt_copy_boxes(sna, alu, src_bo, src_dx, src_dy, dst_bo, dst_dx, dst_dy, @@ -2797,6 +2796,9 @@ fallback_blt: box, n)) return true; + if (big) + goto fallback_blt; + return sna_render_copy_boxes__overlap(sna, alu, src, src_bo, src_dx, src_dy, dst, dst_bo, dst_dx, dst_dy, |