diff --git a/.pick_status.json b/.pick_status.json index f4d55a0ec1b..bba345b3cb2 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -7154,7 +7154,7 @@ "description": "anv: Always disable Color Blending for unused Render Targets", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "d2f7b6d5a7625f916baa9a9ec110a1799c045f49", "notes": null diff --git a/src/intel/vulkan/genX_gfx_state.c b/src/intel/vulkan/genX_gfx_state.c index c9fa96c645b..4c54c1710f8 100644 --- a/src/intel/vulkan/genX_gfx_state.c +++ b/src/intel/vulkan/genX_gfx_state.c @@ -1404,8 +1404,19 @@ update_blend_state(struct anv_gfx_dynamic_state *hw_state, bool alpha_blend_zero = false; uint32_t rt_0 = MESA_VK_ATTACHMENT_UNUSED; for (uint32_t rt = 0; rt < MAX_RTS; rt++) { - if (gfx->color_output_mapping[rt] >= gfx->color_att_count) + if (gfx->color_output_mapping[rt] >= gfx->color_att_count) { + /* The Dual Source Blending documentation says: + * + * "If SRC1 is included in a src/dst blend factor and a DualSource RT + * Write message is not used, results are UNDEFINED." + * + * In practice, this results in hangs if we leave the Dual Source + * Blending enabled for the unused render targets. The easiest way to + * avoid it altogether is to completely disable the blending for them. + */ + SET(BLEND_STATE, blend.rts[rt].ColorBufferBlendEnable, false); continue; + } uint32_t att = gfx->color_output_mapping[rt]; if (att == 0)