mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 06:50:11 +01:00
r600g: optimize spi update
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
This commit is contained in:
parent
8567e02dca
commit
d81126b714
2 changed files with 8 additions and 3 deletions
|
|
@ -202,6 +202,7 @@ struct r600_pipe_context {
|
|||
struct pipe_query *saved_render_cond;
|
||||
unsigned saved_render_cond_mode;
|
||||
/* shader information */
|
||||
boolean spi_dirty;
|
||||
unsigned sprite_coord_enable;
|
||||
boolean flatshade;
|
||||
boolean export_16bpc;
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ void r600_bind_rs_state(struct pipe_context *ctx, void *state)
|
|||
r600_polygon_offset_update(rctx);
|
||||
}
|
||||
if (rctx->ps_shader && rctx->vs_shader)
|
||||
r600_spi_update(rctx);
|
||||
rctx->spi_dirty = true;
|
||||
}
|
||||
|
||||
void r600_delete_rs_state(struct pipe_context *ctx, void *state)
|
||||
|
|
@ -274,7 +274,7 @@ void r600_bind_ps_shader(struct pipe_context *ctx, void *state)
|
|||
r600_context_pipe_state_set(&rctx->ctx, &rctx->ps_shader->rstate);
|
||||
}
|
||||
if (rctx->ps_shader && rctx->vs_shader) {
|
||||
r600_spi_update(rctx);
|
||||
rctx->spi_dirty = true;
|
||||
r600_adjust_gprs(rctx);
|
||||
}
|
||||
}
|
||||
|
|
@ -289,7 +289,7 @@ void r600_bind_vs_shader(struct pipe_context *ctx, void *state)
|
|||
r600_context_pipe_state_set(&rctx->ctx, &rctx->vs_shader->rstate);
|
||||
}
|
||||
if (rctx->ps_shader && rctx->vs_shader) {
|
||||
r600_spi_update(rctx);
|
||||
rctx->spi_dirty = true;
|
||||
r600_adjust_gprs(rctx);
|
||||
}
|
||||
}
|
||||
|
|
@ -391,6 +391,7 @@ static void r600_spi_update(struct r600_pipe_context *rctx)
|
|||
r600_pipe_state_mod_reg(rstate, tmp);
|
||||
}
|
||||
|
||||
rctx->spi_dirty = false;
|
||||
r600_context_pipe_state_set(&rctx->ctx, rstate);
|
||||
}
|
||||
|
||||
|
|
@ -573,6 +574,9 @@ void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
|
|||
if (r600_conv_pipe_prim(draw.info.mode, &prim))
|
||||
return;
|
||||
|
||||
if (rctx->spi_dirty)
|
||||
r600_spi_update(rctx);
|
||||
|
||||
if (rctx->alpha_ref_dirty)
|
||||
r600_update_alpha_ref(rctx);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue