mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Added winex11-Vulkan_support patchset
This commit is contained in:
parent
8df70b8b0c
commit
26bb2b21f2
@ -391,6 +391,7 @@ patch_enable_all ()
|
||||
enable_winex11_DefaultDisplayFrequency="$1"
|
||||
enable_winex11_MWM_Decorations="$1"
|
||||
enable_winex11_UpdateLayeredWindow="$1"
|
||||
enable_winex11_Vulkan_support="$1"
|
||||
enable_winex11_WM_WINDOWPOSCHANGING="$1"
|
||||
enable_winex11_Window_Style="$1"
|
||||
enable_winex11_XEMBED="$1"
|
||||
@ -1349,6 +1350,9 @@ patch_enable ()
|
||||
winex11-UpdateLayeredWindow)
|
||||
enable_winex11_UpdateLayeredWindow="$2"
|
||||
;;
|
||||
winex11-Vulkan_support)
|
||||
enable_winex11_Vulkan_support="$2"
|
||||
;;
|
||||
winex11-WM_WINDOWPOSCHANGING)
|
||||
enable_winex11_WM_WINDOWPOSCHANGING="$2"
|
||||
;;
|
||||
@ -7976,6 +7980,21 @@ if test "$enable_winex11_UpdateLayeredWindow" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset winex11-Vulkan_support
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#44775] Allow vulkan support to be detected at runtime.
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/winex11.drv/vulkan.c
|
||||
# |
|
||||
if test "$enable_winex11_Vulkan_support" -eq 1; then
|
||||
patch_apply winex11-Vulkan_support/0001-winex11-Specify-a-default-vulkan-driver-if-one-not-f.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Alistair Leslie-Hughes", "winex11: Specify a default vulkan driver if one not found at build time.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset winex11-_NET_ACTIVE_WINDOW
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@ -0,0 +1,63 @@
|
||||
From 9dd1831e5104052b7ede82c15ab367102512700e Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 1 Jun 2018 14:03:26 +1000
|
||||
Subject: [PATCH] winex11: Specify a default vulkan driver if one not found at
|
||||
build time
|
||||
|
||||
We cannot specify it as a dependency since Debian Jessie has the
|
||||
vulkan library in backports and not everybody will have this mapped.
|
||||
---
|
||||
dlls/winex11.drv/vulkan.c | 25 +++++++++++++------------
|
||||
1 file changed, 13 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/dlls/winex11.drv/vulkan.c b/dlls/winex11.drv/vulkan.c
|
||||
index a72be33..e38d4f1 100644
|
||||
--- a/dlls/winex11.drv/vulkan.c
|
||||
+++ b/dlls/winex11.drv/vulkan.c
|
||||
@@ -40,7 +40,9 @@
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(vulkan);
|
||||
|
||||
-#ifdef SONAME_LIBVULKAN
|
||||
+#ifndef SONAME_LIBVULKAN
|
||||
+#define SONAME_LIBVULKAN ""
|
||||
+#endif
|
||||
|
||||
typedef VkFlags VkXlibSurfaceCreateFlagsKHR;
|
||||
#define VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR 1000004000
|
||||
@@ -90,9 +92,17 @@ static void *vulkan_handle;
|
||||
|
||||
static BOOL WINAPI wine_vk_init(INIT_ONCE *once, void *param, void **context)
|
||||
{
|
||||
- if (!(vulkan_handle = wine_dlopen(SONAME_LIBVULKAN, RTLD_NOW, NULL, 0)))
|
||||
+ const char *libvulkan_candidates[] = {SONAME_LIBVULKAN,
|
||||
+ "libvulkan.so.1",
|
||||
+ "libvulkan.so",
|
||||
+ NULL};
|
||||
+ int i;
|
||||
+ for (i=0; libvulkan_candidates[i] && !vulkan_handle; i++)
|
||||
+ vulkan_handle = wine_dlopen(libvulkan_candidates[i], RTLD_NOW, NULL, 0);
|
||||
+
|
||||
+ if (!vulkan_handle)
|
||||
{
|
||||
- ERR("Failed to load %s\n", SONAME_LIBVULKAN);
|
||||
+ ERR("Failed to load vulkan library\n");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -574,12 +584,3 @@ const struct vulkan_funcs *get_vulkan_driver(UINT version)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
-#else /* No vulkan */
|
||||
-
|
||||
-const struct vulkan_funcs *get_vulkan_driver(UINT version)
|
||||
-{
|
||||
- ERR("Wine was built without Vulkan support.\n");
|
||||
- return NULL;
|
||||
-}
|
||||
-
|
||||
-#endif /* SONAME_LIBVULKAN */
|
||||
--
|
||||
1.9.1
|
||||
|
1
patches/winex11-Vulkan_support/definition
Normal file
1
patches/winex11-Vulkan_support/definition
Normal file
@ -0,0 +1 @@
|
||||
Fixes: [44775] Allow vulkan support to be detected at runtime.
|
Loading…
x
Reference in New Issue
Block a user