From f5e43058465d33025d99d83927d1ce6a8e103ff9 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 16 May 2014 22:45:45 +0100 Subject: 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 --- src/sna/sna_accel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sna/sna_accel.c') 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", -- cgit v1.2.3