diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-06-27 10:38:59 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-06-27 10:38:59 +0100 |
commit | 6ba4ee1fe842e975c94a01f93c6d39c20eadadbe (patch) | |
tree | 4268f983d80ba74f7c499125f480816d74cf7ce5 | |
parent | 157e22cb8e96b0a9ffa7d58625fe2396f6084ff9 (diff) |
sna: Check source bo is suitable for BLT before doing so
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_blt.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/sna/sna_blt.c b/src/sna/sna_blt.c index 98bd49b9..99cb7d29 100644 --- a/src/sna/sna_blt.c +++ b/src/sna/sna_blt.c @@ -2804,8 +2804,13 @@ fill: if (!tmp->dst.bo) { DBG(("%s: fallback -- unaccelerated read back\n", __FUNCTION__)); +fallback: if (flags & COMPOSITE_FALLBACK || !kgem_bo_is_busy(bo)) goto put; + } else if (!kgem_bo_can_blt(&sna->kgem, bo)) { + DBG(("%s: fallback -- cannot blit from source\n", + __FUNCTION__)); + goto fallback; } else if (bo->snoop && tmp->dst.bo->snoop) { DBG(("%s: fallback -- can not copy between snooped bo\n", __FUNCTION__)); @@ -2813,12 +2818,11 @@ fill: } else if (!kgem_bo_can_blt(&sna->kgem, tmp->dst.bo)) { DBG(("%s: fallback -- unaccelerated upload\n", __FUNCTION__)); - if (flags & COMPOSITE_FALLBACK || !kgem_bo_is_busy(bo)) - goto put; + goto fallback; } else { ret = prepare_blt_copy(sna, tmp, bo, alpha_fixup); - if (flags & COMPOSITE_FALLBACK && !ret) - goto put; + if (!ret) + goto fallback; } } else { RegionRec region; |