diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-10-22 17:36:58 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-10-22 18:21:50 +0100 |
commit | 11e8b299e11ff846e1c8090f7cbd34b2af850d85 (patch) | |
tree | 60d8024b1f3bb0d97e0ccf408f2745fbba55afc7 | |
parent | 4eb736d61a3b45edb921799b74b3b164b94c174a (diff) |
sna: Flush the pending move-to-gpu upon Pixmap free
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 3 | ||||
-rw-r--r-- | src/sna/sna_display.c | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index f58092e2..497e0d19 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -1389,6 +1389,9 @@ static Bool sna_destroy_pixmap(PixmapPtr pixmap) priv->cow = NULL; } + if (priv->move_to_gpu) + (void)priv->move_to_gpu(sna, priv, 0); + /* Always release the gpu bo back to the lower levels of caching */ if (priv->gpu_bo) { sna_pixmap_unmap(pixmap, priv); diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 098eeda2..74231366 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -4285,12 +4285,12 @@ static bool wait_for_shadow(struct sna *sna, struct sna_pixmap *priv, unsigned f assert(wait->bo != priv->gpu_bo); + if (flags == 0 || pixmap != sna->front || !sna->mode.shadow_damage) + goto done; + if ((flags & MOVE_WRITE) == 0) return true; - if (pixmap != sna->front || !sna->mode.shadow_damage) - goto done; - assert(sna->mode.shadow_active); assert(priv->gpu_bo->refcnt >= 1); |