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 */