diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-10-31 11:16:09 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-10-31 11:16:09 +0000 |
commit | 783b8048a6d1a9fd0a73ebf7768ae17dc0b21900 (patch) | |
tree | 711f1fa1bdbedf9c5881312cfe4ad758af113268 | |
parent | 74c912880c302889f38fe5898c8038a0ba20e5db (diff) |
sna: Prefer to use the GPU for uploads if continuing on the GPU
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index a6af3f12..87d3217f 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -1390,6 +1390,9 @@ static inline bool use_cpu_bo_for_upload(struct sna *sna, kgem_bo_is_busy(priv->gpu_bo), kgem_bo_is_busy(priv->cpu_bo))); + if (!priv->cpu) + return true; + if (flags & (MOVE_WRITE | MOVE_ASYNC_HINT)) return true; @@ -3091,9 +3094,6 @@ sna_pixmap_move_to_gpu(PixmapPtr pixmap, unsigned flags) assert(pixmap_contains_damage(pixmap, priv->cpu_damage)); DBG(("%s: uploading %d damage boxes\n", __FUNCTION__, n)); - if (!priv->cpu) - flags |= MOVE_ASYNC_HINT; - ok = false; if (use_cpu_bo_for_upload(sna, priv, flags)) { DBG(("%s: using CPU bo for upload to GPU\n", __FUNCTION__)); |