diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-08-01 13:39:36 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-08-01 13:40:42 +0100 |
commit | 85cef78a40c6a7a0254f8fba685f224eac6038e1 (patch) | |
tree | d56e1a1c2b0e5efeacdff326176e6a2ca064f878 /src/sna | |
parent | 9391a2c71f020541a2a62ae68eadd486216a38df (diff) |
sna/gen7: Simplify the force-stall detection
After reducing the number of conditions where we think we need to force
the stall on the results, we can then simplify the code to detect
that remaining case.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r-- | src/sna/gen7_render.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c index 5f117415..193de001 100644 --- a/src/sna/gen7_render.c +++ b/src/sna/gen7_render.c @@ -1030,13 +1030,12 @@ gen7_emit_state(struct sna *sna, gen7_emit_wm(sna, GEN7_KERNEL(op->u.gen7.flags)); gen7_emit_vertex_elements(sna, op); - need_stall = false; - if (wm_binding_table & 1) - need_stall = GEN7_BLEND(op->u.gen7.flags) != NO_BLEND; - need_stall |= gen7_emit_binding_table(sna, wm_binding_table & ~1); + need_stall = gen7_emit_binding_table(sna, wm_binding_table); need_stall &= gen7_emit_drawing_rectangle(sna, op); if (kgem_bo_is_dirty(op->src.bo) || kgem_bo_is_dirty(op->mask.bo)) { + if (op->dst.bo == op->src.bo || op->dst.bo == op->mask.bo) + need_stall = GEN7_BLEND(op->u.gen7.flags) != NO_BLEND; gen7_emit_pipe_invalidate(sna, need_stall); kgem_clear_dirty(&sna->kgem); kgem_bo_mark_dirty(&sna->kgem, op->dst.bo); @@ -1779,12 +1778,8 @@ static void gen7_emit_composite_state(struct sna *sna, { uint32_t *binding_table; uint16_t offset; - bool dirty; gen7_get_batch(sna); - dirty = false; - if (op->dst.bo == op->src.bo || op->dst.bo == op->mask.bo) - dirty = kgem_bo_is_dirty(op->dst.bo); binding_table = gen7_composite_get_binding_table(sna, &offset); @@ -1816,7 +1811,7 @@ static void gen7_emit_composite_state(struct sna *sna, offset = sna->render_state.gen7.surface_table; } - gen7_emit_state(sna, op, offset | dirty); + gen7_emit_state(sna, op, offset); } static void |