summaryrefslogtreecommitdiff
path: root/src/sna/sna_accel.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-05-16 22:45:45 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-05-18 08:37:13 +0100
commitf5e43058465d33025d99d83927d1ce6a8e103ff9 (patch)
tree9b961c39b81333046b2259fd758deb3c811dae45 /src/sna/sna_accel.c
parentdf297e9fafe1a7de1036f3151f93de67661c2a4e (diff)
sna: Do not mark an upload as a potential replace if the dst is pinned
This saves us from trying to optimise for an operation that cannot happen as we cannot replace the destination buffer. 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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 7aa26273..94bb1e4b 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -6073,7 +6073,7 @@ sna_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc,
if (bo != dst_priv->gpu_bo)
goto fallback;
- if (use_shm_bo(sna, bo, src_priv, alu, replaces)) {
+ if (use_shm_bo(sna, bo, src_priv, alu, replaces && !dst_priv->pinned)) {
bool ret;
DBG(("%s: region overlaps CPU damage, copy from CPU bo (shm? %d)\n",