mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 09:40:08 +01:00
freedreno/a6xx: avoid unnecessary clearing VS DP state
If there is no (potentially unflushed) VS driver-param state, we don't need to emit a DISABLE on each frame. So avoid that to reduce CP overhead. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4813>
This commit is contained in:
parent
f583dc68e5
commit
89dbdb806f
2 changed files with 7 additions and 1 deletions
|
|
@ -78,6 +78,9 @@ struct fd6_context {
|
|||
*/
|
||||
struct ir3_shader_key last_key;
|
||||
|
||||
/* Is there current VS driver-param state set? */
|
||||
bool has_dp_state;
|
||||
|
||||
/* number of active samples-passed queries: */
|
||||
int samples_passed_queries;
|
||||
|
||||
|
|
|
|||
|
|
@ -915,6 +915,7 @@ void
|
|||
fd6_emit_state(struct fd_ringbuffer *ring, struct fd6_emit *emit)
|
||||
{
|
||||
struct fd_context *ctx = emit->ctx;
|
||||
struct fd6_context *fd6_ctx = fd6_context(ctx);
|
||||
struct pipe_framebuffer_state *pfb = &ctx->batch->framebuffer;
|
||||
const struct fd6_program_state *prog = fd6_emit_get_prog(emit);
|
||||
const struct ir3_shader_variant *vs = emit->vs;
|
||||
|
|
@ -1067,8 +1068,10 @@ fd6_emit_state(struct fd_ringbuffer *ring, struct fd6_emit *emit)
|
|||
ctx->batch->submit, IR3_DP_VS_COUNT * 4, FD_RINGBUFFER_STREAMING);
|
||||
ir3_emit_vs_driver_params(vs, dpconstobj, ctx, emit->info);
|
||||
fd6_emit_take_group(emit, dpconstobj, FD6_GROUP_VS_DRIVER_PARAMS, ENABLE_ALL);
|
||||
} else {
|
||||
fd6_ctx->has_dp_state = true;
|
||||
} else if (fd6_ctx->has_dp_state) {
|
||||
fd6_emit_take_group(emit, NULL, FD6_GROUP_VS_DRIVER_PARAMS, ENABLE_ALL);
|
||||
fd6_ctx->has_dp_state = false;
|
||||
}
|
||||
|
||||
struct ir3_stream_output_info *info = &fd6_last_shader(prog)->shader->stream_output;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue