diff options
Diffstat (limited to 'src/sna')
-rw-r--r-- | src/sna/sna_accel.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index a2e5be3b..700eaa8c 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -1397,19 +1397,18 @@ sna_pixmap_create_mappable_gpu(PixmapPtr pixmap, assert_pixmap_damage(pixmap); - if (priv->gpu_bo) { - if (can_replace && - (!kgem_bo_is_mappable(&sna->kgem, priv->gpu_bo) || - __kgem_bo_is_busy(&sna->kgem, priv->gpu_bo))) { - if (priv->pinned) - return false; + if (can_replace && priv->gpu_bo && + (!kgem_bo_is_mappable(&sna->kgem, priv->gpu_bo) || + __kgem_bo_is_busy(&sna->kgem, priv->gpu_bo))) { + if (priv->pinned) + return false; - DBG(("%s: discard busy GPU bo\n", __FUNCTION__)); - sna_pixmap_free_gpu(sna, priv); - } + DBG(("%s: discard busy GPU bo\n", __FUNCTION__)); + sna_pixmap_free_gpu(sna, priv); + } + if (priv->gpu_bo) return kgem_bo_is_mappable(&sna->kgem, priv->gpu_bo); - } assert_pixmap_damage(pixmap); |