summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-02-21 10:55:46 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-02-21 11:29:42 +0000
commit580ae520cad749fb86a1bddd0fa2bcadfd60abb6 (patch)
treee4a971d088ad27eacfbe37e8b0a04e729f6d6019 /src
parentf2aafb98026b5c476b7f84aa2dc4c1f9ba2e573d (diff)
sna: Short-circuit repeated calls to force-to-gpu
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/sna/sna_accel.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 215dbcaf..72c3907d 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -2013,6 +2013,11 @@ sna_pixmap_force_to_gpu(PixmapPtr pixmap, unsigned flags)
if (priv == NULL)
return NULL;
+ if (DAMAGE_IS_ALL(priv->gpu_damage)) {
+ DBG(("%s: GPU all-damaged\n", __FUNCTION__));
+ return priv;
+ }
+
/* Unlike move-to-gpu, we ignore wedged and always create the GPU bo */
if (priv->gpu_bo == NULL) {
struct sna *sna = to_sna_from_pixmap(pixmap);