summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-02-01 19:10:41 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-02-03 09:53:29 +0000
commit418cd98db7c4a2886c9e310f3691eb6c77421dd7 (patch)
treeab068562ee7c8677a4f27354ec83ebdc3f0398c8
parent2d0e7c7ecd7371ac7b5fe3f382fc5d04792f7019 (diff)
sna/gen6: Ring switching outweighs the benefits for cairo-traces
At the moment, the jury is still out on whether freely switching rings for fills is a Good Idea. So make it easier to turn it on and off for testing. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/gen6_render.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c
index ec5412a0..9f799ef8 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -57,6 +57,8 @@
#define NO_FILL_BOXES 0
#define NO_CLEAR 0
+#define NO_RING_SWITCH 1
+
#define GEN6_MAX_SIZE 8192
static const uint32_t ps_kernel_nomask_affine[][4] = {
@@ -2215,6 +2217,11 @@ static bool prefer_blt_ring(struct sna *sna)
return sna->kgem.ring != KGEM_RENDER;
}
+static bool can_switch_rings(struct sna *sna)
+{
+ return sna->kgem.has_semaphores && !NO_RING_SWITCH;
+}
+
static bool
is_solid(PicturePtr picture)
{
@@ -2252,7 +2259,7 @@ try_blt(struct sna *sna,
return TRUE;
}
- if (sna->kgem.has_semaphores) {
+ if (can_switch_rings(sna)) {
if (is_solid(src))
return TRUE;
}
@@ -3432,7 +3439,9 @@ gen6_emit_fill_state(struct sna *sna, const struct sna_composite_op *op)
static inline bool prefer_blt_fill(struct sna *sna,
struct kgem_bo *bo)
{
- return sna->kgem.has_semaphores || prefer_blt_ring(sna) || untiled_tlb_miss(bo);
+ return (can_switch_rings(sna) ||
+ prefer_blt_ring(sna) ||
+ untiled_tlb_miss(bo));
}
static Bool