diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-07-02 11:31:54 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-07-02 12:47:14 +0100 |
commit | 2bf36d54ebdfa2a59bf7ef71134b953628ae5d50 (patch) | |
tree | 4b17d59d82bab794abd381b3a4a527843531e589 | |
parent | 732cd11cf0ca813fdc06f9f09fab120ea4e3a7da (diff) | |
download | xf86-video-intel-2bf36d54ebdfa2a59bf7ef71134b953628ae5d50.tar.gz xf86-video-intel-2bf36d54ebdfa2a59bf7ef71134b953628ae5d50.tar.bz2 xf86-video-intel-2bf36d54ebdfa2a59bf7ef71134b953628ae5d50.zip |
sna/gen6+: Tweak consideration of compositing on BLT
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/gen6_render.c | 11 | ||||
-rw-r--r-- | src/sna/gen7_render.c | 11 | ||||
-rw-r--r-- | src/sna/gen8_render.c | 9 |
3 files changed, 20 insertions, 11 deletions
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c index ece8cdbf4..ab6e296c8 100644 --- a/src/sna/gen6_render.c +++ b/src/sna/gen6_render.c @@ -1943,18 +1943,21 @@ try_blt(struct sna *sna, } bo = __sna_drawable_peek_bo(dst->pDrawable); - if (bo && bo->rq) + if (bo == NULL) + return true; + if (bo->rq) return RQ_IS_BLT(bo->rq); - if (sna_picture_is_solid(src, NULL) && can_switch_to_blt(sna, NULL, 0)) + if (sna_picture_is_solid(src, NULL) && can_switch_to_blt(sna, bo, 0)) return true; if (src->pDrawable) { bo = __sna_drawable_peek_bo(src->pDrawable); if (bo == NULL) return true; - else if (bo->rq) - return RQ_IS_BLT(bo->rq); + + if (prefer_blt_bo(sna, bo)) + return true; } if (sna->kgem.ring == KGEM_BLT) { diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c index 0a35d95f8..b1faac441 100644 --- a/src/sna/gen7_render.c +++ b/src/sna/gen7_render.c @@ -2195,18 +2195,21 @@ try_blt(struct sna *sna, } bo = __sna_drawable_peek_bo(dst->pDrawable); - if (bo && bo->rq) + if (bo == NULL) + return true; + if (bo->rq) return RQ_IS_BLT(bo->rq); - if (sna_picture_is_solid(src, NULL) && can_switch_to_blt(sna, NULL, 0)) + if (sna_picture_is_solid(src, NULL) && can_switch_to_blt(sna, bo, 0)) return true; if (src->pDrawable) { bo = __sna_drawable_peek_bo(src->pDrawable); if (bo == NULL) return true; - else if (bo->rq) - return RQ_IS_BLT(bo->rq); + + if (prefer_blt_bo(sna, bo)) + return true; } if (sna->kgem.ring == KGEM_BLT) { diff --git a/src/sna/gen8_render.c b/src/sna/gen8_render.c index 392a107c9..3cdbfd5f8 100644 --- a/src/sna/gen8_render.c +++ b/src/sna/gen8_render.c @@ -2012,17 +2012,20 @@ try_blt(struct sna *sna, } bo = __sna_drawable_peek_bo(dst->pDrawable); - if (bo && bo->rq) + if (bo == NULL) + return true; + if (bo->rq) return RQ_IS_BLT(bo->rq); - if (sna_picture_is_solid(src, NULL) && can_switch_to_blt(sna, NULL, 0)) + if (sna_picture_is_solid(src, NULL) && can_switch_to_blt(sna, bo, 0)) return true; if (src->pDrawable) { bo = __sna_drawable_peek_bo(src->pDrawable); if (bo == NULL) return true; - else if (bo->rq) + + if (prefer_blt_bo(sna, bo)) return RQ_IS_BLT(bo->rq); } |