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:
@@ -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))) {
|
||||
|
||||
Reference in New Issue
Block a user