[PATCH] winevulkan: Fix vkEnumerateInstanceExtensionProperties() behavior when no Vulkan driver is present.

Brendan Shanks bshanks at codeweavers.com
Fri Aug 14 17:43:48 CDT 2020


Signed-off-by: Brendan Shanks <bshanks at codeweavers.com>
---

This is compliant with the spec and matches the behavior of the
official Vulkan loader after a recent change, see
<https://github.com/KhronosGroup/Vulkan-Loader/pull/423>.

 dlls/winevulkan/vulkan.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c
index 1b359d22c8c..9f8e2451ad9 100644
--- a/dlls/winevulkan/vulkan.c
+++ b/dlls/winevulkan/vulkan.c
@@ -793,7 +793,10 @@ VkResult WINAPI wine_vkEnumerateInstanceExtensionProperties(const char *layer_na
 
     wine_vk_init_once();
     if (!vk_funcs)
-        return VK_ERROR_INITIALIZATION_FAILED;
+    {
+        *count = 0;
+        return VK_SUCCESS;
+    }
 
     res = vk_funcs->p_vkEnumerateInstanceExtensionProperties(NULL, &num_host_properties, NULL);
     if (res != VK_SUCCESS)
-- 
2.26.2




More information about the wine-devel mailing list