From: Eric Anholt Date: Wed, 1 Nov 2017 20:56:25 +0000 (-0700) Subject: broadcom/vc5: Don't emit updated blend factors/funcs while disabled. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f90ee6eb2b9a7b454ae22c4f63e027a56b5969f9;p=mesa.git broadcom/vc5: Don't emit updated blend factors/funcs while disabled. The dirty bit will be flagged again when re-enbaled. Keeps us from emitting blend state in CLs that never do blending. --- diff --git a/src/gallium/drivers/vc5/vc5_emit.c b/src/gallium/drivers/vc5/vc5_emit.c index 9df4c1ee3eb..51709176a2c 100644 --- a/src/gallium/drivers/vc5/vc5_emit.c +++ b/src/gallium/drivers/vc5/vc5_emit.c @@ -325,7 +325,7 @@ vc5_emit_state(struct pipe_context *pctx) } } - if (vc5->dirty & VC5_DIRTY_BLEND) { + if (vc5->dirty & VC5_DIRTY_BLEND && vc5->blend->rt[0].blend_enable) { struct pipe_blend_state *blend = vc5->blend; cl_emit(&job->bcl, BLEND_CONFIG, config) { @@ -347,6 +347,10 @@ vc5_emit_state(struct pipe_context *pctx) vc5_factor(rtblend->alpha_src_factor, vc5->blend_dst_alpha_one); } + } + + if (vc5->dirty & VC5_DIRTY_BLEND) { + struct pipe_blend_state *blend = vc5->blend; cl_emit(&job->bcl, COLOUR_WRITE_MASKS, mask) { if (blend->independent_blend_enable) {