etnaviv: simplify stencil ref front/back selection condition

Drop the check for front stencil enable when selecting which stencil
ref value to put into the back stencil state. If the front stencil
isn't enabled then stencil operations as a whole aren't enabled and
we don't care which value ends up in the state.

While at it fix indentation.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35704>
This commit is contained in:
Lucas Stach
2025-06-23 23:32:30 +02:00
committed by Marge Bot
parent a6e9061880
commit 2dc5db625b
+3 -5
View File
@@ -532,12 +532,10 @@ etna_emit_state(struct etna_context *ctx)
}
if (unlikely(dirty & (ETNA_DIRTY_STENCIL_REF | ETNA_DIRTY_RASTERIZER | ETNA_DIRTY_ZSA))) {
uint32_t val = etna_zsa_state(ctx->zsa)->PE_STENCIL_CONFIG_EXT;
if (!ctx->zsa->stencil[1].enabled &&
ctx->zsa->stencil[0].enabled &&
ctx->zsa->stencil[0].valuemask)
val |= ctx->stencil_ref.PE_STENCIL_CONFIG_EXT[!ccw];
if (!ctx->zsa->stencil[1].enabled && ctx->zsa->stencil[0].valuemask)
val |= ctx->stencil_ref.PE_STENCIL_CONFIG_EXT[!ccw];
else
val |= ctx->stencil_ref.PE_STENCIL_CONFIG_EXT[ccw];
val |= ctx->stencil_ref.PE_STENCIL_CONFIG_EXT[ccw];
/*014A0*/ EMIT_STATE(PE_STENCIL_CONFIG_EXT, val);
}
if (unlikely(dirty & (ETNA_DIRTY_BLEND | ETNA_DIRTY_FRAMEBUFFER))) {