diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-09-12 14:11:43 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-09-12 14:59:05 +0100 |
commit | e5f137807c318588f546960668345eef34159e26 (patch) | |
tree | 4cf3fe268a402a61c63f54604cc30d9062575b34 /src/sna/sna_accel.c | |
parent | 0d17208a66a7e54d4106f8a4034d3a928e28bb62 (diff) |
sna: Avoid fallbacks to shadow pixels if FORCE_GPU is in effect
References: https://bugs.freedesktop.org/show_bug.cgi?id=54808
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.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index e12585e7..5bff247a 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -2613,9 +2613,12 @@ sna_drawable_use_bo(DrawablePtr drawable, unsigned flags, const BoxRec *box, } if (DAMAGE_IS_ALL(priv->cpu_damage)) { - DBG(("%s: use CPU fast path (all-damaged)\n", __FUNCTION__)); - assert(priv->gpu_damage == NULL); - goto use_cpu_bo; + if ((flags & FORCE_GPU) == 0 || priv->cpu_bo) { + DBG(("%s: use CPU fast path (all-damaged), and not forced-gpu\n", + __FUNCTION__)); + assert(priv->gpu_damage == NULL); + goto use_cpu_bo; + } } DBG(("%s: gpu? %d, damaged? %d; cpu? %d, damaged? %d\n", __FUNCTION__, @@ -2653,9 +2656,10 @@ sna_drawable_use_bo(DrawablePtr drawable, unsigned flags, const BoxRec *box, } } - if (priv->cpu_damage) { - if ((flags & (PREFER_GPU | FORCE_GPU)) == 0) { - DBG(("%s: prefer cpu", __FUNCTION__)); + if ((flags & FORCE_GPU) == 0 && priv->cpu_damage) { + if ((flags & PREFER_GPU) == 0) { + DBG(("%s: already damaged and prefer cpu", + __FUNCTION__)); goto use_cpu_bo; } |