From 0a2c5eb7669c249194b41d624ca05654a8d7035b Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 4 Oct 2012 13:51:23 +0100 Subject: sna: Once again look into assertions around sna_pixmap->cpu Revert back to basics, and clear the CPU flag everytime we use the GPU, rather than try to avoid clearing it along some paths. Signed-off-by: Chris Wilson --- src/sna/sna_accel.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index c159f43b..94ed9338 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -3016,10 +3016,8 @@ 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); @@ -3071,7 +3069,6 @@ 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; } } @@ -3139,7 +3136,6 @@ sna_pixmap_move_to_gpu(PixmapPtr pixmap, unsigned flags) __sna_damage_destroy(DAMAGE_PTR(priv->cpu_damage)); priv->cpu_damage = NULL; priv->undamaged = true; - priv->cpu = false; if (priv->shm) { assert(!priv->flush); @@ -3171,7 +3167,7 @@ done: active: if (flags & MOVE_WRITE) priv->clear = false; - assert(priv->cpu == false); + priv->cpu = false; assert(!priv->gpu_bo->proxy || (flags & MOVE_WRITE) == 0); return sna_pixmap_mark_active(sna, priv); } -- cgit v1.2.3