From bd61bfe45fc425870e2238f8461c4b72240369f9 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 2 Apr 2016 03:49:51 +0200 Subject: [PATCH] vulkan-Vulkan_Implementation: Also try to load libvulkan.so.1. --- patches/patchinstall.sh | 2 + ...04-vulkan-Try-to-load-libvulkan.so.1.patch | 42 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 patches/vulkan-Vulkan_Implementation/0004-vulkan-Try-to-load-libvulkan.so.1.patch diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 05702e1d..f989ac21 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -7024,10 +7024,12 @@ if test "$enable_vulkan_Vulkan_Implementation" -eq 1; then patch_apply vulkan-Vulkan_Implementation/0001-vulkan-Initial-implementation.patch patch_apply vulkan-Vulkan_Implementation/0002-vulkan-Implement-vkGetPhysicalDeviceWin32Presentatio.patch patch_apply vulkan-Vulkan_Implementation/0003-vulkan-Use-binary-search-to-lookup-function-in-is_nu.patch + patch_apply vulkan-Vulkan_Implementation/0004-vulkan-Try-to-load-libvulkan.so.1.patch ( echo '+ { "Sebastian Lackner", "vulkan: Initial implementation.", 2 },'; echo '+ { "Michael Müller", "vulkan: Implement vkGetPhysicalDeviceWin32PresentationSupportKHR.", 1 },'; echo '+ { "Sebastian Lackner", "vulkan: Use binary search to lookup function in is_null_func.", 1 },'; + echo '+ { "Michael Müller", "vulkan: Try to load libvulkan.so.1.", 1 },'; ) >> "$patchlist" fi diff --git a/patches/vulkan-Vulkan_Implementation/0004-vulkan-Try-to-load-libvulkan.so.1.patch b/patches/vulkan-Vulkan_Implementation/0004-vulkan-Try-to-load-libvulkan.so.1.patch new file mode 100644 index 00000000..70bf278e --- /dev/null +++ b/patches/vulkan-Vulkan_Implementation/0004-vulkan-Try-to-load-libvulkan.so.1.patch @@ -0,0 +1,42 @@ +From e2f13a81be20013376928c02d5405c831452cddb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michael=20M=C3=BCller?= +Date: Fri, 1 Apr 2016 23:58:28 +0200 +Subject: vulkan: Try to load libvulkan.so.1. + +--- + dlls/vulkan/vulkan_thunks.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/dlls/vulkan/vulkan_thunks.c b/dlls/vulkan/vulkan_thunks.c +index acced5e..aea8d64 100644 +--- a/dlls/vulkan/vulkan_thunks.c ++++ b/dlls/vulkan/vulkan_thunks.c +@@ -6572,13 +6572,24 @@ static void *libvulkan_handle; + + BOOL init_vulkan( void ) + { ++ static const char *libname[] = ++ { ++ "libvulkan.so.1", ++ "libvulkan.so", ++ }; + void *ptr; + int i; + + if (!(function_heap = HeapCreate( HEAP_CREATE_ENABLE_EXECUTE, 0, 0 ))) + return FALSE; + +- if (!(libvulkan_handle = wine_dlopen( "libvulkan.so", RTLD_NOW, NULL, 0 ))) ++ for (i = 0; i < ARRAY_SIZE(libname); i++) ++ { ++ libvulkan_handle = wine_dlopen( libname[i], RTLD_NOW, NULL, 0 ); ++ if (libvulkan_handle) break; ++ } ++ ++ if (!libvulkan_handle) + { + ERR_(winediag)( "failed to load libvulkan.so, no support for vulkan\n" ); + HeapDestroy( function_heap ); +-- +2.7.1 +