diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-06-23 14:02:51 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-06-23 14:02:51 +0100 |
commit | 25776547bb7d76010f948769c8c08a7f418b15fd (patch) | |
tree | 6fcb8c047d586ed8ea570ce56389625c1d2b950b /src/sna | |
parent | a3c9cbefcb9971900638144286b59112e3cfd404 (diff) |
sna: Prefer rendering on the CPU to avoid damage migration
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r-- | src/sna/sna_accel.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 9752b181..20a0f84f 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -3851,14 +3851,16 @@ prefer_gpu_bo: goto move_to_gpu; } - if (priv->gpu_bo && priv->gpu_bo->tiling) { - DBG(("%s: prefer to use GPU bo for rendering large pixmaps\n", __FUNCTION__)); - goto prefer_gpu_bo; - } + if ((priv->cpu_damage == NULL || flags & IGNORE_DAMAGE)) { + if (priv->gpu_bo && priv->gpu_bo->tiling) { + DBG(("%s: prefer to use GPU bo for rendering large pixmaps\n", __FUNCTION__)); + goto prefer_gpu_bo; + } - if (priv->cpu_bo->pitch >= 4096) { - DBG(("%s: prefer to use GPU bo for rendering wide pixmaps\n", __FUNCTION__)); - goto prefer_gpu_bo; + if (priv->cpu_bo->pitch >= 4096) { + DBG(("%s: prefer to use GPU bo for rendering wide pixmaps\n", __FUNCTION__)); + goto prefer_gpu_bo; + } } if ((flags & IGNORE_DAMAGE) == 0 && priv->cpu_bo->snoop) { |