summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-01-29 14:09:46 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-01-29 14:47:12 +0000
commit518a99ea34b26aa094f29a4cc1ea5419f63a0e56 (patch)
tree5c269f83cbaab6595c42d4e578217f09d5d23641
parent624d9843abda9ca6bd1b004d70a6fdc082ba9653 (diff)
sna: Always create a GPU bo for copying from an existent source GPU bo
Make sure we prevent the readback of an active source GPU bo by always prefering to do the copy on the GPU if the data is already resisent. This fixes the second regression from e583af9cc, (sna: Experiment with creating large objects as CPU bo). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-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 ce351131..5d0e042a 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -3211,7 +3211,7 @@ sna_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc,
}
/* Try to maintain the data on the GPU */
- if (dst_priv->gpu_bo == NULL && dst_priv->gpu &&
+ if (dst_priv->gpu_bo == NULL &&
((dst_priv->cpu_damage == NULL && copy_use_gpu_bo(sna, dst_priv, &region)) ||
(src_priv && (src_priv->gpu_bo != NULL || (src_priv->cpu_bo && kgem_bo_is_busy(src_priv->cpu_bo)))))) {
uint32_t tiling = sna_pixmap_choose_tiling(dst_pixmap);