summaryrefslogtreecommitdiff
path: root/src/sna/gen7_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-10-10 12:18:31 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-10-10 12:19:20 +0100
commitddcd8607027c67f8260ffd4eae8543f832885cb8 (patch)
treefc0756c615187caed77973abd5b60a23ae87dea6 /src/sna/gen7_render.c
parentc99d44d7f09fc92daf64eee1f6f3300e11e1cf01 (diff)
sna/gen6+: Only allow switching to BLT for fills if we have semaphores
An extra caveat to these generations for commit 97d809c26bec2c0120f2dc0bcfd840379bd996fa Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Thu Oct 10 00:15:55 2013 +0100 sna: Pass usage hint down to render fill routines is that we don't want to incur ring switch overheads that may overwhelm any advantages from using the BLT. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen7_render.c')
-rw-r--r--src/sna/gen7_render.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c
index 37eb8dd9..e9295299 100644
--- a/src/sna/gen7_render.c
+++ b/src/sna/gen7_render.c
@@ -3349,7 +3349,8 @@ static inline bool prefer_blt_fill(struct sna *sna,
struct kgem_bo *bo,
unsigned flags)
{
- if (flags & (FILL_POINTS | FILL_SPANS))
+ if (flags & (FILL_POINTS | FILL_SPANS) &&
+ can_switch_to_blt(sna, bo, 0))
return true;
if (untiled_tlb_miss(bo))