mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
ilo: avoid unnecessary emission of SO states
No need to emit 3DSTATE_SO_BUFFER and 3DSTATE_SO_DECL_LIST when SO is disabled. As the implicit flush done by the commands is also gone, emit an explicit flush.
This commit is contained in:
parent
08f87ac333
commit
bbb30398e5
2 changed files with 15 additions and 9 deletions
|
|
@ -376,13 +376,18 @@ draw_vbo(struct ilo_3d *hw3d, const struct ilo_context *ilo,
|
|||
|
||||
ilo_3d_own_render_ring(hw3d);
|
||||
|
||||
/*
|
||||
* Without a better tracking mechanism, when the framebuffer changes, we
|
||||
* have to assume that the old framebuffer may be sampled from. If that
|
||||
* happens in the middle of a batch buffer, we need to insert manual
|
||||
* flushes.
|
||||
*/
|
||||
need_flush = (!hw3d->new_batch && (ilo->dirty & ILO_DIRTY_FRAMEBUFFER));
|
||||
if (!hw3d->new_batch) {
|
||||
/*
|
||||
* Without a better tracking mechanism, when the framebuffer changes, we
|
||||
* have to assume that the old framebuffer may be sampled from. If that
|
||||
* happens in the middle of a batch buffer, we need to insert manual
|
||||
* flushes.
|
||||
*/
|
||||
need_flush = (ilo->dirty & ILO_DIRTY_FRAMEBUFFER);
|
||||
|
||||
/* same to SO target changes */
|
||||
need_flush |= (ilo->dirty & ILO_DIRTY_STREAM_OUTPUT_TARGETS);
|
||||
}
|
||||
|
||||
/* make sure there is enough room first */
|
||||
max_len = ilo_3d_pipeline_estimate_size(hw3d->pipeline,
|
||||
|
|
|
|||
|
|
@ -394,7 +394,8 @@ gen7_pipeline_sol(struct ilo_3d_pipeline *p,
|
|||
gen6_pipeline_update_max_svbi(p, ilo, session);
|
||||
|
||||
/* 3DSTATE_SO_BUFFER */
|
||||
if (DIRTY(STREAM_OUTPUT_TARGETS) || dirty_sh) {
|
||||
if ((DIRTY(STREAM_OUTPUT_TARGETS) || dirty_sh) &&
|
||||
ilo->stream_output_targets.num_targets) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ilo->stream_output_targets.num_targets; i++) {
|
||||
|
|
@ -416,7 +417,7 @@ gen7_pipeline_sol(struct ilo_3d_pipeline *p,
|
|||
}
|
||||
|
||||
/* 3DSTATE_SO_DECL_LIST */
|
||||
if (dirty_sh)
|
||||
if (dirty_sh && ilo->stream_output_targets.num_targets)
|
||||
p->gen7_3DSTATE_SO_DECL_LIST(p->dev, so_info, sh, p->cp);
|
||||
|
||||
/* 3DSTATE_STREAMOUT */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue