diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-25 20:12:27 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-26 12:48:02 +0000 |
commit | 65164d90b7b17ec7eea1e24d4b02ec037b55b1ff (patch) | |
tree | 888feb476046216a611d07bd4372a80c4c6672ee | |
parent | 307f493d76580687a3cf56106bf296475f1f53e5 (diff) |
sna/gen2+: Do not force use of GPU if the target is simply cleared
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/gen2_render.c | 2 | ||||
-rw-r--r-- | src/sna/gen3_render.c | 2 | ||||
-rw-r--r-- | src/sna/gen4_render.c | 2 | ||||
-rw-r--r-- | src/sna/gen5_render.c | 2 | ||||
-rw-r--r-- | src/sna/gen6_render.c | 4 | ||||
-rw-r--r-- | src/sna/gen7_render.c | 4 |
6 files changed, 10 insertions, 6 deletions
diff --git a/src/sna/gen2_render.c b/src/sna/gen2_render.c index d75a4122..eb8d4efa 100644 --- a/src/sna/gen2_render.c +++ b/src/sna/gen2_render.c @@ -1558,7 +1558,7 @@ gen2_composite_fallback(struct sna *sna, /* If anything is on the GPU, push everything out to the GPU */ priv = sna_pixmap(dst_pixmap); - if (priv && priv->gpu_damage) { + if (priv && priv->gpu_damage && !priv->clear) { DBG(("%s: dst is already on the GPU, try to use GPU\n", __FUNCTION__)); return FALSE; diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c index 618f6946..95a79b2b 100644 --- a/src/sna/gen3_render.c +++ b/src/sna/gen3_render.c @@ -2467,7 +2467,7 @@ gen3_composite_fallback(struct sna *sna, /* If anything is on the GPU, push everything out to the GPU */ priv = sna_pixmap(dst_pixmap); - if (priv && priv->gpu_damage) { + if (priv && priv->gpu_damage && !priv->clear) { DBG(("%s: dst is already on the GPU, try to use GPU\n", __FUNCTION__)); return FALSE; diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c index c1ceb33a..c798ce50 100644 --- a/src/sna/gen4_render.c +++ b/src/sna/gen4_render.c @@ -2056,7 +2056,7 @@ gen4_composite_fallback(struct sna *sna, /* If anything is on the GPU, push everything out to the GPU */ priv = sna_pixmap(dst_pixmap); - if (priv && priv->gpu_damage) { + if (priv && priv->gpu_damage && !priv->clear) { DBG(("%s: dst is already on the GPU, try to use GPU\n", __FUNCTION__)); return FALSE; diff --git a/src/sna/gen5_render.c b/src/sna/gen5_render.c index 6308d103..47c4e967 100644 --- a/src/sna/gen5_render.c +++ b/src/sna/gen5_render.c @@ -2094,7 +2094,7 @@ gen5_composite_fallback(struct sna *sna, /* If anything is on the GPU, push everything out to the GPU */ priv = sna_pixmap(dst_pixmap); - if (priv && priv->gpu_damage) { + if (priv && priv->gpu_damage && !priv->clear) { DBG(("%s: dst is already on the GPU, try to use GPU\n", __FUNCTION__)); return FALSE; diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c index 5cbdd748..c3bc2e77 100644 --- a/src/sna/gen6_render.c +++ b/src/sna/gen6_render.c @@ -2307,7 +2307,9 @@ gen6_composite_fallback(struct sna *sna, /* If anything is on the GPU, push everything out to the GPU */ priv = sna_pixmap(dst_pixmap); - if (priv && (priv->gpu_damage || (priv->cpu_bo && kgem_bo_is_busy(priv->cpu_bo)))) { + if (priv && + ((priv->gpu_damage && !priv->clear) || + (priv->cpu_bo && kgem_bo_is_busy(priv->cpu_bo)))) { DBG(("%s: dst is already on the GPU, try to use GPU\n", __FUNCTION__)); return FALSE; diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c index ee546e18..21d8c99d 100644 --- a/src/sna/gen7_render.c +++ b/src/sna/gen7_render.c @@ -2374,7 +2374,9 @@ gen7_composite_fallback(struct sna *sna, /* If anything is on the GPU, push everything out to the GPU */ priv = sna_pixmap(dst_pixmap); - if (priv && (priv->gpu_damage || (priv->cpu_bo && kgem_bo_is_busy(priv->cpu_bo)))) { + if (priv && + ((priv->gpu_damage && !priv->clear) || + (priv->cpu_bo && kgem_bo_is_busy(priv->cpu_bo)))) { DBG(("%s: dst is already on the GPU, try to use GPU\n", __FUNCTION__)); return FALSE; |