From 7cc604ed1b5c7f9c06811458ddf0ac0f33412304 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: --- src/intel/vulkan/genX_gfx_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/vulkan/genX_gfx_state.c b/src/intel/vulkan/genX_gfx_state.c index 3d7c8607e79..05e80423274 100644 --- a/src/intel/vulkan/genX_gfx_state.c +++ b/src/intel/vulkan/genX_gfx_state.c @@ -1062,7 +1062,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 ?