summaryrefslogtreecommitdiff
path: root/src/sna/sna_composite.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-09-01 09:49:34 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-09-01 10:12:58 +0100
commit25c1b478a957ceb0474e7121840b7eed1ba2e140 (patch)
treebce9f675d350b1b587b952d268221399e67f8fa1 /src/sna/sna_composite.c
parent530b1d1516595cf14c5112d8833b870cd50eca46 (diff)
sna: Discard cached CPU upload early when clearing with a solid fill
Otherwise we end up considering the GPU bo as a real target, causing confusion and failed asserts. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_composite.c')
-rw-r--r--src/sna/sna_composite.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sna/sna_composite.c b/src/sna/sna_composite.c
index d47479b9..65dae9ca 100644
--- a/src/sna/sna_composite.c
+++ b/src/sna/sna_composite.c
@@ -829,6 +829,10 @@ sna_composite_rectangles(CARD8 op,
if (priv->cpu_damage &&
region_subsumes_damage(&region, priv->cpu_damage)) {
DBG(("%s: discarding existing CPU damage\n", __FUNCTION__));
+ if (priv->gpu_bo && priv->gpu_bo->proxy) {
+ kgem_bo_destroy(&sna->kgem, priv->gpu_bo);
+ priv->gpu_bo = NULL;
+ }
sna_damage_destroy(&priv->cpu_damage);
list_del(&priv->list);
}