sna: Discard all damage when replacing pixmap contents

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2011-12-19 19:51:12 +00:00
parent addf66dda7
commit 351c8f1633
1 changed files with 3 additions and 0 deletions

View File

@ -624,6 +624,9 @@ sna_pixmap_move_to_cpu(PixmapPtr pixmap, unsigned int flags)
if ((flags & MOVE_READ) == 0) {
assert(flags == MOVE_WRITE);
sna_damage_destroy(&priv->cpu_damage);
sna_damage_destroy(&priv->gpu_damage);
if (priv->gpu_bo && pixmap_inplace(sna, pixmap, priv)) {
if (kgem_bo_is_busy(priv->gpu_bo) &&
priv->gpu_bo->exec == NULL)