sna/accel: Only skip undamaging the GPU for reads

Introduced with ac1b83240e (sna/accel: Simplify single pixel read-back)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2011-09-23 11:35:50 +01:00
parent 5913c90967
commit c68856f346
1 changed files with 3 additions and 2 deletions

View File

@ -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,