From 5142d1ca3fd877f2ca9277af314f6432580370de Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 10 Feb 2014 16:42:06 +0000 Subject: sna: Remove damaged region after converting CPU bo to GPU bo Reported-by: Jiri Slaby References: https://bugs.freedesktop.org/show_bug.cgi?id=70461 Signed-off-by: Chris Wilson --- src/sna/sna_accel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3