turnip: Don't use the dynamic color write enable during non-dynamic.

We have the correct merged color write enable state as a local var here,
use that instead of the zero cmd->state.color_write_enable.  Fixes
blending in many traces with ANGLE on turnip.  In the process of fixing,
clarify the logic a little bit.

Fixes: 169e03800d ("tu: Implement VK_EXT_color_write_enable")
Fixes: #7328
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18956>
This commit is contained in:
Emma Anholt
2022-10-04 10:15:00 -07:00
committed by Marge Bot
parent 6f27bf2504
commit dadb29cf2e

View File

@@ -4338,10 +4338,9 @@ tu6_emit_blend(struct tu_cs *cs, struct tu_cmd_buffer *cmd)
}
}
uint32_t blend_enable_mask =
(cmd->state.logic_op_enabled && cmd->state.rop_reads_dst) ?
color_write_enable : (cmd->state.pipeline_blend_enable &
cmd->state.color_write_enable);
uint32_t blend_enable_mask = color_write_enable;
if (!(cmd->state.logic_op_enabled && cmd->state.rop_reads_dst))
blend_enable_mask &= cmd->state.pipeline_blend_enable;
tu_cs_emit_regs(cs, A6XX_SP_FS_OUTPUT_CNTL1(.mrt = pipeline->blend.num_rts));
tu_cs_emit_regs(cs, A6XX_RB_FS_OUTPUT_CNTL1(.mrt = pipeline->blend.num_rts));