summaryrefslogtreecommitdiff
path: root/src/sna/sna_accel.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-07-07 00:06:36 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-07-07 00:09:38 +0100
commit18b3090381ac0fb61df96a7c6b2f12aacf180ee8 (patch)
treec84ceb364781cdeda2a845060483577285a0aa47 /src/sna/sna_accel.c
parent24b59a8955eb15522ad334a541530aca937fcf07 (diff)
sna: Fixup USE_INPLACE debug hint
After we enabled inplace readback, we can just apply the INPLACE hint to all fallbacks, but instead apply it to the automatic testing for a potential inplace operation. 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.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 794086c6..e553baf4 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -1065,7 +1065,7 @@ _sna_pixmap_move_to_cpu(PixmapPtr pixmap, unsigned int flags)
priv->gpu_bo ? priv->gpu_bo->handle : 0,
priv->gpu_damage, priv->cpu_damage, priv->clear));
- if ((flags & MOVE_READ) == 0) {
+ if (USE_INPLACE && (flags & MOVE_READ) == 0) {
assert(flags & MOVE_WRITE);
DBG(("%s: no readbck, discarding gpu damage [%d], pending clear[%d]\n",
__FUNCTION__, priv->gpu_damage != NULL, priv->clear));
@@ -1485,7 +1485,7 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable,
return _sna_pixmap_move_to_cpu(pixmap, flags);
}
- if ((flags & MOVE_READ) == 0) {
+ if (USE_INPLACE && (flags & MOVE_READ) == 0) {
DBG(("%s: no read, checking to see if we can stream the write into the GPU bo\n",
__FUNCTION__));
assert(flags & MOVE_WRITE);
@@ -2001,8 +2001,6 @@ inline static unsigned drawable_gc_flags(DrawablePtr draw,
__FUNCTION__, drawable_gc_inplace_hint(draw, gc)));
flags = MOVE_WRITE;
- if (USE_INPLACE)
- flags |= MOVE_INPLACE_HINT;
if (read) {
DBG(("%s: partial write\n", __FUNCTION__));
flags |= MOVE_READ;