From e01f71ad466dc92f89b48d697cb1c2b563471f78 Mon Sep 17 00:00:00 2001 From: Sagar Ghuge Date: Mon, 8 Apr 2024 15:10:39 -0700 Subject: [PATCH] anv: Fix typo in DestinationAlphaBlendFactor value Workaround states that if Destination Alpha Blend Factor==BLENDFACTOR_ZERO, instead use BLENDFACTOR_CONST_ALPHA with the constant alpha set to 0. We had typo while setting the DestinationAlphaBlendFactor, use BLENDFACTOR_CONST_ALPHA instead of BLENDFACTOR_CONST_COLOR. Signed-off-by: Sagar Ghuge Cc: mesa-stable Reviewed-by: Lionel Landwerlin Part-of: (cherry picked from commit 7cc604ed1b5c7f9c06811458ddf0ac0f33412304) --- .pick_status.json | 2 +- src/intel/vulkan/genX_gfx_state.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index e4128083bde..92afc15d71d 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -4344,7 +4344,7 @@ "description": "anv: Fix typo in DestinationAlphaBlendFactor value", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/intel/vulkan/genX_gfx_state.c b/src/intel/vulkan/genX_gfx_state.c index c2930e8ad0d..df1d970282b 100644 --- a/src/intel/vulkan/genX_gfx_state.c +++ b/src/intel/vulkan/genX_gfx_state.c @@ -1028,7 +1028,7 @@ genX(cmd_buffer_flush_gfx_runtime_state)(struct anv_cmd_buffer *cmd_buffer) SET(PS_BLEND, ps_blend.ColorBufferBlendEnable, GET(blend.rts[0].ColorBufferBlendEnable)); SET(PS_BLEND, ps_blend.SourceAlphaBlendFactor, GET(blend.rts[0].SourceAlphaBlendFactor)); SET(PS_BLEND, ps_blend.DestinationAlphaBlendFactor, gfx->alpha_blend_zero ? - BLENDFACTOR_CONST_COLOR : + BLENDFACTOR_CONST_ALPHA : GET(blend.rts[0].DestinationAlphaBlendFactor)); SET(PS_BLEND, ps_blend.SourceBlendFactor, GET(blend.rts[0].SourceBlendFactor)); SET(PS_BLEND, ps_blend.DestinationBlendFactor, gfx->color_blend_zero ?