summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-10-03 22:53:57 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-10-03 22:53:57 +0100
commitb71af5dc626adfdf7d753e8e61fb13e8b9290d17 (patch)
treeb4fc86722b01027340fea62f18b63e05e2c17fd1
parent0d42872d1e0bab1808c0a544c7ece049da103825 (diff)
sna: Clear sna_pixmap->cpu when destroying the CPU damage
So that we keep the assertion checks that without CPU damage we can not be on the cpu. Reported-by: Clemens Eisserer <linuxhippy@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55591 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 2fb5529d..5ebedad9 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -3012,8 +3012,10 @@ sna_pixmap_move_to_gpu(PixmapPtr pixmap, unsigned flags)
priv->gpu_bo = NULL;
}
- if ((flags & MOVE_READ) == 0)
+ if ((flags & MOVE_READ) == 0) {
sna_damage_destroy(&priv->cpu_damage);
+ priv->cpu = false;
+ }
sna_damage_reduce(&priv->cpu_damage);
assert_pixmap_damage(pixmap);
@@ -3065,6 +3067,7 @@ sna_pixmap_move_to_gpu(PixmapPtr pixmap, unsigned flags)
pixmap->drawable.height);
DBG(("%s: marking as all-damaged for GPU\n",
__FUNCTION__));
+ assert(priv->cpu == false);
goto active;
}
}