sna: Destroy the cached upload buffer if before copying into it
As we discard the buffer after the next batch, we will lose the contents of the pixmap. Instead discard the cache, and treat it as a normal shadow again. References: https://bugs.freedesktop.org/show_bug.cgi?id=42426 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
015db20287
commit
06b28d541b
|
|
@ -3402,7 +3402,10 @@ sna_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc,
|
|||
dst_priv->clear = false;
|
||||
}
|
||||
|
||||
assert(dst_priv->gpu_bo == NULL || dst_priv->gpu_bo->proxy == NULL);
|
||||
if (dst_priv->gpu_bo && dst_priv->gpu_bo->proxy) {
|
||||
kgem_bo_destroy(&sna->kgem, dst_priv->gpu_bo);
|
||||
dst_priv->gpu_bo = NULL;
|
||||
}
|
||||
|
||||
/* Try to maintain the data on the GPU */
|
||||
if (dst_priv->gpu_bo == NULL &&
|
||||
|
|
|
|||
Loading…
Reference in New Issue