diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-07-27 13:24:04 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-07-27 14:35:01 +0100 |
commit | fb385745a2347f8966765567e78229d67ddc8d60 (patch) | |
tree | 4c35e19cac9613e963a8f922f63feedd70fb56cf /src | |
parent | 73ddd8b0decee444a57f10a11f05deebba686649 (diff) |
sna/gen4: Move the common vertex_offset==0 check into the flush()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/gen4_render.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c index 1a860bdd..58d4422b 100644 --- a/src/sna/gen4_render.c +++ b/src/sna/gen4_render.c @@ -338,7 +338,8 @@ static void gen4_magic_ca_pass(struct sna *sna, static void gen4_vertex_flush(struct sna *sna) { - assert(sna->render_state.gen4.vertex_offset); + if (sna->render_state.gen4.vertex_offset == 0) + return; DBG(("%s[%x] = %d\n", __FUNCTION__, 4*sna->render_state.gen4.vertex_offset, @@ -359,8 +360,7 @@ static int gen4_vertex_finish(struct sna *sna) bo = sna->render.vbo; if (bo) { - if (sna->render_state.gen4.vertex_offset) - gen4_vertex_flush(sna); + gen4_vertex_flush(sna); for (i = 0; i < ARRAY_SIZE(sna->render.vertex_reloc); i++) { if (sna->render.vertex_reloc[i]) { @@ -1783,8 +1783,7 @@ gen4_render_video(struct sna *sna, } priv->clear = false; - if (sna->render_state.gen4.vertex_offset) - gen4_vertex_flush(sna); + gen4_vertex_flush(sna); return true; } @@ -2693,8 +2692,7 @@ fastcall static void gen4_render_composite_spans_done(struct sna *sna, const struct sna_composite_spans_op *op) { - if (sna->render_state.gen4.vertex_offset) - gen4_vertex_flush(sna); + gen4_vertex_flush(sna); DBG(("%s()\n", __FUNCTION__)); @@ -3072,8 +3070,7 @@ gen4_render_copy_blt(struct sna *sna, static void gen4_render_copy_done(struct sna *sna, const struct sna_copy_op *op) { - if (sna->render_state.gen4.vertex_offset) - gen4_vertex_flush(sna); + gen4_vertex_flush(sna); } static bool @@ -3366,8 +3363,7 @@ gen4_render_fill_op_boxes(struct sna *sna, static void gen4_render_fill_op_done(struct sna *sna, const struct sna_fill_op *op) { - if (sna->render_state.gen4.vertex_offset) - gen4_vertex_flush(sna); + gen4_vertex_flush(sna); kgem_bo_destroy(&sna->kgem, op->base.src.bo); } |