summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-03-15 13:20:35 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-03-15 13:32:35 +0000
commit0a8218a535babb5969a58c3a7da0215912f6fef8 (patch)
tree822f45c65bebb93aa2f0d64990f1e75e89d9c151
parent77c9c03b102e6fac2279f0085034557bd68c5112 (diff)
sna: Prefer the CPU bo for uploads if last access was not through the shadow
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 03ac4002..22ee1e64 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -1745,7 +1745,7 @@ sna_pixmap_move_area_to_gpu(PixmapPtr pixmap, BoxPtr box, unsigned int flags)
if (n) {
Bool ok = FALSE;
- if (use_cpu_bo_for_xfer(priv))
+ if (pixmap->devPrivate.ptr == NULL || use_cpu_bo_for_xfer(priv))
ok = sna->render.copy_boxes(sna, GXcopy,
pixmap, priv->cpu_bo, 0, 0,
pixmap, priv->gpu_bo, 0, 0,
@@ -1783,7 +1783,7 @@ sna_pixmap_move_area_to_gpu(PixmapPtr pixmap, BoxPtr box, unsigned int flags)
} else if (DAMAGE_IS_ALL(priv->cpu_damage) ||
sna_damage_contains_box__no_reduce(priv->cpu_damage, box)) {
Bool ok = FALSE;
- if (use_cpu_bo_for_xfer(priv))
+ if (pixmap->devPrivate.ptr == NULL || use_cpu_bo_for_xfer(priv))
ok = sna->render.copy_boxes(sna, GXcopy,
pixmap, priv->cpu_bo, 0, 0,
pixmap, priv->gpu_bo, 0, 0,
@@ -1812,7 +1812,7 @@ sna_pixmap_move_area_to_gpu(PixmapPtr pixmap, BoxPtr box, unsigned int flags)
box = REGION_RECTS(&i);
ok = FALSE;
- if (use_cpu_bo_for_xfer(priv))
+ if (pixmap->devPrivate.ptr == NULL || use_cpu_bo_for_xfer(priv))
ok = sna->render.copy_boxes(sna, GXcopy,
pixmap, priv->cpu_bo, 0, 0,
pixmap, priv->gpu_bo, 0, 0,
@@ -2283,7 +2283,7 @@ sna_pixmap_move_to_gpu(PixmapPtr pixmap, unsigned flags)
DBG(("%s: uploading %d damage boxes\n", __FUNCTION__, n));
ok = FALSE;
- if (use_cpu_bo_for_xfer(priv))
+ if (pixmap->devPrivate.ptr == NULL || use_cpu_bo_for_xfer(priv))
ok = sna->render.copy_boxes(sna, GXcopy,
pixmap, priv->cpu_bo, 0, 0,
pixmap, priv->gpu_bo, 0, 0,