summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-03-13 22:00:25 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-03-13 22:00:25 +0000
commitd23ee0380b61e0dfd3ed56b8b4a15fd0b7956491 (patch)
tree99809f97d90d7d2c2a713ad48b3557f8dc2e0db5
parent0acec1685328b1dd9dffa804a27a122fc6e4225a (diff)
sna: Reuse the cached upload as a source GPU bo
References: https://bugs.freedesktop.org/show_bug.cgi?id=42426 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index b0b55a49..ce13982f 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -2236,6 +2236,11 @@ sna_pixmap_move_to_gpu(PixmapPtr pixmap, unsigned flags)
if (priv->cpu_damage == NULL)
goto done;
+ if (priv->gpu_bo->proxy) {
+ assert((flags & MOVE_WRITE) ==0);
+ goto done;
+ }
+
if (priv->mapped) {
assert(priv->stride);
pixmap->devPrivate.ptr = priv->ptr;