summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-10-04 13:51:23 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-10-04 13:51:23 +0100
commit0a2c5eb7669c249194b41d624ca05654a8d7035b (patch)
tree0a6c14eb5dfa2007b91ae1f7bc269b9890f42720 /src
parent4d3b849c57d78f0447334c5c0871d8bd78e0af24 (diff)
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 <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/sna/sna_accel.c8
1 files changed, 2 insertions, 6 deletions
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);
}