etnaviv: don't always emit PE_DEPTH_CONFIG on shader changes
Since b29fe26d43 ("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 <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19686>
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user