vulkan: Fix calculation of flags in vk_graphics_pipeline_state_fill

Fixes: 2b62d90158 ("vk/graphics_state: Support VK_KHR_maintenance5")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10705
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27929>
This commit is contained in:
qbojj 2024-03-02 01:45:49 +01:00 committed by Marge Bot
parent 597c1c1c18
commit 4b7f4724f8

View file

@ -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