From 4b7f4724f88b8343d9d950f66dc93f5e6313b276 Mon Sep 17 00:00:00 2001 From: qbojj <105227351+qbojj@users.noreply.github.com> Date: Sat, 2 Mar 2024 01:45:49 +0100 Subject: [PATCH] vulkan: Fix calculation of flags in vk_graphics_pipeline_state_fill Fixes: 2b62d901588 ("vk/graphics_state: Support VK_KHR_maintenance5") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10705 Reviewed-by: Samuel Pitoiset Part-of: --- src/vulkan/runtime/vk_graphics_state.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vulkan/runtime/vk_graphics_state.c b/src/vulkan/runtime/vk_graphics_state.c index 5040a260181..3f875a33d50 100644 --- a/src/vulkan/runtime/vk_graphics_state.c +++ b/src/vulkan/runtime/vk_graphics_state.c @@ -1367,9 +1367,11 @@ vk_graphics_pipeline_state_fill(const struct vk_device *device, vk_find_struct_const(info->pNext, GRAPHICS_PIPELINE_LIBRARY_CREATE_INFO_EXT); const VkPipelineLibraryCreateInfoKHR *lib_info = vk_find_struct_const(info->pNext, PIPELINE_LIBRARY_CREATE_INFO_KHR); + + VkPipelineCreateFlags2KHR pipeline_flags = vk_graphics_pipeline_create_flags(info); VkShaderStageFlagBits allowed_stages; - if (!(info->flags & VK_PIPELINE_CREATE_LIBRARY_BIT_KHR)) { + if (!(pipeline_flags & VK_PIPELINE_CREATE_2_LIBRARY_BIT_KHR)) { allowed_stages = VK_SHADER_STAGE_ALL_GRAPHICS | VK_SHADER_STAGE_TASK_BIT_EXT | VK_SHADER_STAGE_MESH_BIT_EXT; @@ -1414,7 +1416,7 @@ vk_graphics_pipeline_state_fill(const struct vk_device *device, if (gpl_info) { lib = gpl_info->flags; } else if ((lib_info && lib_info->libraryCount > 0) || - (info->flags & VK_PIPELINE_CREATE_LIBRARY_BIT_KHR)) { + (pipeline_flags & VK_PIPELINE_CREATE_2_LIBRARY_BIT_KHR)) { /* * From the Vulkan 1.3.210 spec: * "If this structure is omitted, and either VkGraphicsPipelineCreateInfo::flags