diff options
author | Chia-I Wu <[email protected]> | 2015-03-04 14:38:50 -0700 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2015-03-04 15:28:05 -0700 |
commit | b5eb6f769db71557c86c72c3352db149379fdade (patch) | |
tree | 18583d10f5ec230ee963e5936cc288a26a6b92bd /src/gallium/drivers/ilo/ilo_render_gen6.c | |
parent | 1424bdd61bce26f0853e974fc3b87c4c275e6ef0 (diff) |
ilo: improve WA handling in rectlist path
Add wrappers for 3DPRIMITIVE to make sure we clear current_pipe_control_dw1
and deferred_pipe_control_dw1 after it. Add missing
gen7_wa_post_ps_and_later().
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_render_gen6.c')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_render_gen6.c | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/src/gallium/drivers/ilo/ilo_render_gen6.c b/src/gallium/drivers/ilo/ilo_render_gen6.c index 0221acdc7e6..723288266be 100644 --- a/src/gallium/drivers/ilo/ilo_render_gen6.c +++ b/src/gallium/drivers/ilo/ilo_render_gen6.c @@ -41,7 +41,7 @@ /** * A wrapper for gen6_PIPE_CONTROL(). */ -static inline void +static void gen6_pipe_control(struct ilo_render *r, uint32_t dw1) { struct intel_bo *bo = (dw1 & GEN6_PIPE_CONTROL_WRITE__MASK) ? @@ -56,6 +56,20 @@ gen6_pipe_control(struct ilo_render *r, uint32_t dw1) assert(!r->state.deferred_pipe_control_dw1); } +static void +gen6_3dprimitive(struct ilo_render *r, + const struct pipe_draw_info *info, + const struct ilo_ib_state *ib) +{ + ILO_DEV_ASSERT(r->dev, 6, 6); + + /* 3DPRIMITIVE */ + gen6_3DPRIMITIVE(r->builder, info, ib); + + r->state.current_pipe_control_dw1 = 0; + assert(!r->state.deferred_pipe_control_dw1); +} + /** * This should be called before PIPE_CONTROL. */ @@ -482,18 +496,6 @@ gen6_draw_vf_statistics(struct ilo_render *r, gen6_3DSTATE_VF_STATISTICS(r->builder, false); } -static void -gen6_draw_vf_draw(struct ilo_render *r, - const struct ilo_state_vector *vec, - struct ilo_render_draw_session *session) -{ - /* 3DPRIMITIVE */ - gen6_3DPRIMITIVE(r->builder, vec->draw, &vec->ib); - - r->state.current_pipe_control_dw1 = 0; - assert(!r->state.deferred_pipe_control_dw1); -} - void gen6_draw_vs(struct ilo_render *r, const struct ilo_state_vector *vec, @@ -850,7 +852,8 @@ ilo_render_emit_draw_commands_gen6(struct ilo_render *render, gen6_draw_wm_raster(render, vec, session); gen6_draw_sf_rect(render, vec, session); gen6_draw_vf(render, vec, session); - gen6_draw_vf_draw(render, vec, session); + + gen6_3dprimitive(render, vec->draw, &vec->ib); } static void @@ -995,7 +998,7 @@ ilo_render_emit_rectlist_commands_gen6(struct ilo_render *r, gen6_3DSTATE_DRAWING_RECTANGLE(r->builder, 0, 0, blitter->fb.width, blitter->fb.height); - gen6_3DPRIMITIVE(r->builder, &blitter->draw, NULL); + gen6_3dprimitive(r, &blitter->draw, NULL); } int |