From 9b7dc8de4537ef695c24e18c2bd0f1b50c62e006 Mon Sep 17 00:00:00 2001 From: lizzie Date: Sun, 25 Jan 2026 08:40:49 +0000 Subject: [PATCH] [vk] handle mali/adreno5xx driver bug returning VK_INCOMPLETE on graphics pipeline creation Signed-off-by: lizzie --- src/video_core/vulkan_common/vulkan_wrapper.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/video_core/vulkan_common/vulkan_wrapper.cpp b/src/video_core/vulkan_common/vulkan_wrapper.cpp index 534a11edd4..d153d757de 100644 --- a/src/video_core/vulkan_common/vulkan_wrapper.cpp +++ b/src/video_core/vulkan_common/vulkan_wrapper.cpp @@ -727,10 +727,14 @@ PipelineLayout Device::CreatePipelineLayout(const VkPipelineLayoutCreateInfo& ci return PipelineLayout(object, handle, *dld); } -Pipeline Device::CreateGraphicsPipeline(const VkGraphicsPipelineCreateInfo& ci, - VkPipelineCache cache) const { - VkPipeline object; - Check(dld->vkCreateGraphicsPipelines(handle, cache, 1, &ci, nullptr, &object)); +Pipeline Device::CreateGraphicsPipeline(const VkGraphicsPipelineCreateInfo& ci, VkPipelineCache cache) const { + VkPipeline object = VK_NULL_HANDLE; + auto const result = dld->vkCreateGraphicsPipelines(handle, cache, 1, &ci, nullptr, &object); + // Adreno 5xx drivers do not properly return error when a graphics pipeline fails to be created + // Some (unkown) Mali drivers also do not properly return + if (result == VK_INCOMPLETE) + return Pipeline(object, handle, *dld); + Check(result); return Pipeline(object, handle, *dld); }