From 0fb9064231687ff7af4cb48697ee24b48715b80f Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 14 Aug 2023 11:39:31 -0400 Subject: [PATCH] vk/graphics: fix CWE handling with DS3 VkPipelineColorBlendStateCreateInfo::attachmentCount cannot be used to generate the CWE mask since it cannot be read if enough dynamic state is in use instead just pass the max mask and let drivers figure it out cc: mesa-stable Reviewed-by: Faith Ekstrand Part-of: --- src/vulkan/runtime/vk_graphics_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vulkan/runtime/vk_graphics_state.c b/src/vulkan/runtime/vk_graphics_state.c index 22935ff..0a7b072 100644 --- a/src/vulkan/runtime/vk_graphics_state.c +++ b/src/vulkan/runtime/vk_graphics_state.c @@ -992,7 +992,7 @@ vk_color_blend_state_init(struct vk_color_blend_state *cb, } cb->color_write_enables = color_write_enables; } else { - cb->color_write_enables = BITFIELD_MASK(cb_info->attachmentCount); + cb->color_write_enables = BITFIELD_MASK(MESA_VK_MAX_COLOR_ATTACHMENTS); } } -- 2.7.4