summaryrefslogtreecommitdiff
path: root/src/sna/sna_accel.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-06-23 21:30:56 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-06-23 23:53:47 +0100
commitd3de043d2de4aa11a85c56faf1658ec4c4699da2 (patch)
treee5a61d3bf9ffe73b7c1e4689e394bea16ac4b608 /src/sna/sna_accel.c
parentd68d24dc3727dcc281bc9b45bc605874f3a3c4f2 (diff)
sna: Discard proxy upload buffers before overwritting for PutImage
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_accel.c')
-rw-r--r--src/sna/sna_accel.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index ba97b33c..0994c331 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -3942,7 +3942,13 @@ try_upload_tiled_x(PixmapPtr pixmap, RegionRec *region,
DBG(("%s: bo? %d, can tile? %d\n", __FUNCTION__,
priv->gpu_bo != NULL,
- priv->gpu_bo ? can_upload_tiled(&sna->kgem, priv->gpu_bo) : 0));
+ priv->gpu_bo ? can_upload_tiled_x(&sna->kgem, priv->gpu_bo) : 0));
+
+ if (priv->gpu_bo && priv->gpu_bo->proxy) {
+ DBG(("%s: discarding cached upload proxy\n", __FUNCTION__));
+ kgem_bo_destroy(&sna->kgem, priv->gpu_bo);
+ priv->gpu_bo = NULL;
+ }
if (priv->gpu_bo == NULL &&
!create_upload_tiled_x(&sna->kgem, pixmap, priv))