diff options
author | Plamena Manolova <[email protected]> | 2017-10-02 23:58:25 +0300 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2017-10-02 16:25:36 -0700 |
commit | 646e1123859405da36c7a9920e0c5e270eb4979f (patch) | |
tree | 9e9ce214f145f0904df7db24f17cb71b9574ca70 /src | |
parent | c63c8f51358e47383aa0f447b6882070a6d509a1 (diff) |
i965: Indroduce brw_finish_drawing.
In order to add our ARB_indirect_parameters implementation we
need to refactor brw_try_draw_prims so that it operates on a
per primitive basis and move the loop into brw_draw_prims.
This commit introduces the brw_finish_drawing function where
we move the code that executes once after the loop.
Signed-off-by: Plamena Manolova <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_draw.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c index 1e93cb67c67..513a05bb960 100644 --- a/src/mesa/drivers/dri/i965/brw_draw.c +++ b/src/mesa/drivers/dri/i965/brw_draw.c @@ -658,6 +658,19 @@ brw_prepare_drawing(struct gl_context *ctx, brw->ctx.NewDriverState |= BRW_NEW_VERTICES; } +static void +brw_finish_drawing(struct gl_context *ctx) +{ + struct brw_context *brw = brw_context(ctx); + + if (brw->always_flush_batch) + intel_batchbuffer_flush(brw); + + brw_program_cache_check_size(brw); + brw_postdraw_reconcile_align_wa_slices(brw); + brw_postdraw_set_buffers_need_resolve(brw); +} + /* May fail if out of video memory for texture or vbo upload, or on * fallback conditions. */ @@ -796,13 +809,6 @@ retry: brw_render_state_finished(brw); } - if (brw->always_flush_batch) - intel_batchbuffer_flush(brw); - - brw_program_cache_check_size(brw); - brw_postdraw_reconcile_align_wa_slices(brw); - brw_postdraw_set_buffers_need_resolve(brw); - return; } @@ -863,6 +869,7 @@ brw_draw_prims(struct gl_context *ctx, * to it. */ brw_try_draw_prims(ctx, arrays, prims, nr_prims, xfb_obj, stream, indirect); + brw_finish_drawing(ctx); } void |