summaryrefslogtreecommitdiff
path: root/src/sna/gen6_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-07-19 16:25:54 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-07-19 16:51:54 +0100
commitfc39d4b5cb105d269c5349e479daf112f5d93580 (patch)
tree5b4366a3d11b56f6245d211f889a5c5855c1c1f3 /src/sna/gen6_render.c
parent15d3eea7004822e5cbd48d676692e1b6a2b26d3e (diff)
sna/gen6: Add a simple DBG option to limit usage of either BLT/RENDER
We can force the code to either select only BLT or RENDER operations - for those that we have a choice for at least! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen6_render.c')
-rw-r--r--src/sna/gen6_render.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c
index 389d002b..20a09d00 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -52,6 +52,7 @@
#define NO_FILL_CLEAR 0
#define NO_RING_SWITCH 0
+#define PREFER_RENDER 0
#define GEN6_MAX_SIZE 8192
@@ -2344,6 +2345,9 @@ gen6_composite_set_target(struct sna *sna,
static bool prefer_blt_ring(struct sna *sna)
{
+ if (PREFER_RENDER)
+ return PREFER_RENDER < 0;
+
return sna->kgem.ring != KGEM_RENDER;
}
@@ -3272,6 +3276,9 @@ static inline bool prefer_blt_copy(struct sna *sna,
PixmapPtr dst, struct kgem_bo *dst_bo,
unsigned flags)
{
+ if (PREFER_RENDER)
+ return PREFER_RENDER > 0;
+
return (sna->kgem.ring == KGEM_BLT ||
(flags & COPY_LAST && sna->kgem.mode == KGEM_NONE) ||
prefer_blt_bo(sna, src, src_bo) ||
@@ -3647,6 +3654,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)
{
+ if (PREFER_RENDER)
+ return PREFER_RENDER < 0;
+
return (can_switch_rings(sna) ||
prefer_blt_ring(sna) ||
untiled_tlb_miss(bo));