sna: Flush the pending move-to-gpu upon Pixmap free
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
4eb736d61a
commit
11e8b299e1
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue