vulkan-Vulkan_Implementation: Also try to load libvulkan.so.1.

This commit is contained in:
Sebastian Lackner 2016-04-02 03:49:51 +02:00
parent 1b9726a88e
commit bd61bfe45f
2 changed files with 44 additions and 0 deletions

View File

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

View File

@ -0,0 +1,42 @@
From e2f13a81be20013376928c02d5405c831452cddb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
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