diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-21 10:31:24 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-21 20:32:39 +0100 |
commit | 4f2dde1fa3b04b27bae8fc0bca9c824bd362d23b (patch) | |
tree | fc86d46bec93b33a6cd1f302de12e5323ac730b6 | |
parent | 3ef05a8d0833203e265aff392f225a11a11c2d01 (diff) |
sna/gen7: Eliminate the pipeline stall after a non-pipelined operation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/gen7_render.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c index b0f7cfcd..726a67e3 100644 --- a/src/sna/gen7_render.c +++ b/src/sna/gen7_render.c @@ -955,12 +955,12 @@ gen7_emit_vertex_elements(struct sna *sna, } inline static void -gen7_emit_pipe_invalidate(struct sna *sna) +gen7_emit_pipe_invalidate(struct sna *sna, bool stall) { OUT_BATCH(GEN7_PIPE_CONTROL | (4 - 2)); OUT_BATCH(GEN7_PIPE_CONTROL_WC_FLUSH | GEN7_PIPE_CONTROL_TC_FLUSH | - GEN7_PIPE_CONTROL_CS_STALL); + (stall ? GEN7_PIPE_CONTROL_CS_STALL : 0)); OUT_BATCH(0); OUT_BATCH(0); } @@ -1020,7 +1020,7 @@ gen7_emit_state(struct sna *sna, need_stall &= gen7_emit_drawing_rectangle(sna, op); if (kgem_bo_is_dirty(op->src.bo) || kgem_bo_is_dirty(op->mask.bo)) { - gen7_emit_pipe_invalidate(sna); + gen7_emit_pipe_invalidate(sna, need_stall); kgem_clear_dirty(&sna->kgem); kgem_bo_mark_dirty(op->dst.bo); need_stall = false; @@ -1042,7 +1042,7 @@ static void gen7_magic_ca_pass(struct sna *sna, DBG(("%s: CA fixup (%d -> %d)\n", __FUNCTION__, sna->render.vertex_start, sna->render.vertex_index)); - gen7_emit_pipe_invalidate(sna); + gen7_emit_pipe_invalidate(sna, true); gen7_emit_cc(sna, gen7_get_blend(PictOpAdd, TRUE, op->dst.format)); gen7_emit_wm(sna, |