From 3408cce076467266da1c53a1a8f4045fbc2d7118 Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Fri, 11 Nov 2022 17:29:18 +0100 Subject: [PATCH] etnaviv: don't always emit PE_DEPTH_CONFIG on shader changes Since b29fe26d4387 ("etnaviv: rework ZSA into a derived state") the PE depth config is adjusted by etna_update_zsa() when the shader is changed. When the PE depth config is actually changing as a result of this adjustment the ZSA state is dirtied, so there is no need to emit the state unconditionally when the shader is changed. Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel Part-of: --- src/gallium/drivers/etnaviv/etnaviv_emit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_emit.c b/src/gallium/drivers/etnaviv/etnaviv_emit.c index ccb2b8c8fa1..ddf1397c22e 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_emit.c +++ b/src/gallium/drivers/etnaviv/etnaviv_emit.c @@ -429,7 +429,7 @@ etna_emit_state(struct etna_context *ctx) /*01010*/ EMIT_STATE(PS_CONTROL, ctx->framebuffer.PS_CONTROL); /*01030*/ EMIT_STATE(PS_CONTROL_EXT, ctx->framebuffer.PS_CONTROL_EXT); } - if (unlikely(dirty & (ETNA_DIRTY_ZSA | ETNA_DIRTY_FRAMEBUFFER | ETNA_DIRTY_SHADER))) { + if (unlikely(dirty & (ETNA_DIRTY_ZSA | ETNA_DIRTY_FRAMEBUFFER))) { /*01400*/ EMIT_STATE(PE_DEPTH_CONFIG, (etna_zsa_state(ctx->zsa)->PE_DEPTH_CONFIG | ctx->framebuffer.PE_DEPTH_CONFIG)); }