Commit 1de20f86 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

winevulkan: Move __wine_get_vulkan_driver call to Unix lib.

parent 35413f92
...@@ -2,7 +2,7 @@ MODULE = winevulkan.dll ...@@ -2,7 +2,7 @@ MODULE = winevulkan.dll
UNIXLIB = winevulkan.so UNIXLIB = winevulkan.so
IMPORTLIB = winevulkan IMPORTLIB = winevulkan
IMPORTS = user32 gdi32 advapi32 setupapi win32u IMPORTS = user32 gdi32 advapi32 setupapi win32u
UNIX_LIBS = $(PTHREAD_LIBS) UNIX_LIBS = -lwin32u $(PTHREAD_LIBS)
C_SRCS = \ C_SRCS = \
loader.c \ loader.c \
......
...@@ -215,24 +215,11 @@ VkResult WINAPI vk_icdNegotiateLoaderICDInterfaceVersion(uint32_t *supported_ver ...@@ -215,24 +215,11 @@ VkResult WINAPI vk_icdNegotiateLoaderICDInterfaceVersion(uint32_t *supported_ver
static BOOL WINAPI wine_vk_init(INIT_ONCE *once, void *param, void **context) static BOOL WINAPI wine_vk_init(INIT_ONCE *once, void *param, void **context)
{ {
const void *driver;
driver = __wine_get_vulkan_driver(WINE_VULKAN_DRIVER_VERSION);
if (!driver)
{
ERR("Failed to load Wine graphics driver supporting Vulkan.\n");
return FALSE;
}
if (NtQueryVirtualMemory(GetCurrentProcess(), hinstance, MemoryWineUnixFuncs, if (NtQueryVirtualMemory(GetCurrentProcess(), hinstance, MemoryWineUnixFuncs,
&unix_handle, sizeof(unix_handle), NULL)) &unix_handle, sizeof(unix_handle), NULL))
return FALSE; return FALSE;
if (vk_unix_call(unix_init, &driver) || !driver) return !vk_unix_call(unix_init, &unix_funcs);
return FALSE;
unix_funcs = driver;
return TRUE;
} }
static BOOL wine_vk_init_once(void) static BOOL wine_vk_init_once(void)
......
...@@ -436,7 +436,14 @@ static void wine_vk_device_free(struct VkDevice_T *device) ...@@ -436,7 +436,14 @@ static void wine_vk_device_free(struct VkDevice_T *device)
NTSTATUS init_vulkan(void *args) NTSTATUS init_vulkan(void *args)
{ {
vk_funcs = *(const struct vulkan_funcs **)args; vk_funcs = __wine_get_vulkan_driver(WINE_VULKAN_DRIVER_VERSION);
if (!vk_funcs)
{
ERR("Failed to load Wine graphics driver supporting Vulkan.\n");
return STATUS_UNSUCCESSFUL;
}
*(const struct unix_funcs **)args = &loader_funcs; *(const struct unix_funcs **)args = &loader_funcs;
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment