From b98965d5078c660e5626230a727360530e219f38 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: (cherry picked from commit 4b7f4724f88b8343d9d950f66dc93f5e6313b276) --- .pick_status.json | 2 +- src/vulkan/runtime/vk_graphics_state.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index b7c3b1619aa..f60e23eecd8 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -764,7 +764,7 @@ "description": "vulkan: Fix calculation of flags in vk_graphics_pipeline_state_fill", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "2b62d90158821f16a9b223a04b2b5a7641b98f34", "notes": null diff --git a/src/vulkan/runtime/vk_graphics_state.c b/src/vulkan/runtime/vk_graphics_state.c index d4f42c3083b..65e24157102 100644 --- a/src/vulkan/runtime/vk_graphics_state.c +++ b/src/vulkan/runtime/vk_graphics_state.c @@ -1283,9 +1283,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; @@ -1330,7 +1332,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