From ec7a962e3a011fab8bd8974ec58de7a170bae533 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Mon, 20 Nov 2023 16:20:01 +0100 Subject: [PATCH] etnaviv: blend: Move logicop_enable assignment With this change the next one will look nicer. Signed-off-by: Christian Gmeiner Reviewed-by: Lucas Stach Part-of: --- src/gallium/drivers/etnaviv/etnaviv_blend.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_blend.c b/src/gallium/drivers/etnaviv/etnaviv_blend.c index c6d90eac02b..15fba559722 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_blend.c +++ b/src/gallium/drivers/etnaviv/etnaviv_blend.c @@ -54,6 +54,9 @@ etna_blend_state_create(struct pipe_context *pctx, co->base = *so; + logicop_enable = so->logicop_enable && + VIV_FEATURE(ctx->screen, ETNA_FEATURE_LOGIC_OP); + /* Enable blending if * - blend enabled in blend state * - NOT source factor is ONE and destination factor ZERO and eq is ADD for @@ -91,9 +94,6 @@ etna_blend_state_create(struct pipe_context *pctx, co->rt[0].PE_ALPHA_CONFIG = 0; } - logicop_enable = so->logicop_enable && - VIV_FEATURE(ctx->screen, ETNA_FEATURE_LOGIC_OP); - co->PE_LOGIC_OP = VIVS_PE_LOGIC_OP_OP(logicop_enable ? so->logicop_func : LOGIC_OP_COPY) | VIVS_PE_LOGIC_OP_DITHER_MODE(3) | /* TODO: related to dithering, sometimes 2 */