summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-09-23 11:35:50 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-09-23 11:49:43 +0100
commitc68856f34653ac3e7af900dfbba41a108ffe119e (patch)
tree32487d33a6e1b3d5c100ab5177e55d3060191c13
parent5913c90967091124e7c7b262782f0e99cf400eab (diff)
sna/accel: Only skip undamaging the GPU for reads
Introduced with ac1b83240e5 (sna/accel: Simplify single pixel read-back) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 1f06f033..cbeca1e1 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -466,9 +466,10 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable,
region->extents.x2 - region->extents.x1,
region->extents.y2 - region->extents.y1));
- if (region->extents.x2 - region->extents.x1 == 1 &&
+ if (!write &&
+ region->extents.x2 - region->extents.x1 == 1 &&
region->extents.y2 - region->extents.y1 == 1) {
- /* Oftenassociated with synchonrisation, KISS */
+ /* Often associated with synchronisation, KISS */
sna_read_boxes(sna,
priv->gpu_bo, 0, 0,
pixmap, 0, 0,