vulkan: ignore VkPipelineColorWriteCreateInfoEXT if the state is dynamic
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 10 Aug 2023 07:16:34 +0000 (09:16 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 11 Aug 2023 23:38:55 +0000 (23:38 +0000)
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24601>

src/vulkan/runtime/vk_graphics_state.c

index 04114fe..22935ff 100644 (file)
@@ -983,7 +983,7 @@ vk_color_blend_state_init(struct vk_color_blend_state *cb,
 
    const VkPipelineColorWriteCreateInfoEXT *cw_info =
       vk_find_struct_const(cb_info->pNext, PIPELINE_COLOR_WRITE_CREATE_INFO_EXT);
-   if (cw_info != NULL) {
+   if (!IS_DYNAMIC(CB_COLOR_WRITE_ENABLES) && cw_info != NULL) {
       uint8_t color_write_enables = 0;
       assert(cb_info->attachmentCount == cw_info->attachmentCount);
       for (uint32_t a = 0; a < cw_info->attachmentCount; a++) {