diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-02-10 16:42:06 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-02-10 16:42:06 +0000 |
commit | 5142d1ca3fd877f2ca9277af314f6432580370de (patch) | |
tree | e4a6a60aadc3affc0758984f25a684ec7434873c /src | |
parent | 1267235fd474c5249d45a7015e3d741dc607e57f (diff) |
sna: Remove damaged region after converting CPU bo to GPU bo
Reported-by: Jiri Slaby <jirislaby@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=70461
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/sna_accel.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 871b1f81..56af0582 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -2440,6 +2440,7 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable, priv->gpu_damage = priv->cpu_damage; priv->cpu_damage = NULL; + sna_damage_subtract(&priv->gpu_damage, region); discard_gpu = false; } else { DBG(("%s: pushing surrounding damage to GPU bo\n", __FUNCTION__)); @@ -2449,13 +2450,13 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable, sna_pixmap_free_cpu(sna, priv, false); if (priv->flush) sna_add_flush_pixmap(sna, priv, priv->gpu_bo); - discard_gpu = false; assert(priv->cpu_damage == NULL); sna_damage_all(&priv->gpu_damage, pixmap->drawable.width, pixmap->drawable.height); sna_damage_subtract(&priv->gpu_damage, region); + discard_gpu = false; } } sna_damage_add(&priv->cpu_damage, region); |