From 2f99070708ce8f591c31e1e908809a0ce551c13f Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 10 Feb 2014 14:19:53 +0000 Subject: sna: Clear GPU damage flag for 1x1 writes onto a clear buffer An optimisation for 1x1 reads of a clear buffer lead to a bug whereby the damage for a 1x1 write would not be tracked correctly (conflicting full GPU damage vs partial CPU damage). Signed-off-by: Chris Wilson --- src/sna/sna_accel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 39199972..531dd40d 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -2688,7 +2688,8 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable, box++; } while (--n); - if (region->extents.x2 - region->extents.x1 > 1 || + if (flags & MOVE_WRITE || + region->extents.x2 - region->extents.x1 > 1 || region->extents.y2 - region->extents.y1 > 1) { sna_damage_subtract(&priv->gpu_damage, region); priv->clear = false; -- cgit v1.2.3