Commit a29e6b8b authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

d3d12: Load vulkan-1.dll once.

parent f6be7253
......@@ -47,11 +47,25 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag);
#ifdef USE_WIN32_VULKAN
static HMODULE vulkan_module;
/* FIXME: We should unload vulkan-1.dll. */
static BOOL WINAPI load_vulkan_dll_once(INIT_ONCE *once, void *param, void **context)
{
vulkan_module = LoadLibraryA("vulkan-1.dll");
return TRUE;
}
static PFN_vkGetInstanceProcAddr load_vulkan(void)
{
HMODULE vulkan = LoadLibraryA("vulkan-1.dll");
return (void *)GetProcAddress(vulkan, "vkGetInstanceProcAddr");
static INIT_ONCE init_once = INIT_ONCE_STATIC_INIT;
InitOnceExecuteOnce(&init_once, load_vulkan_dll_once, NULL, NULL);
if (vulkan_module)
return (void *)GetProcAddress(vulkan_module, "vkGetInstanceProcAddr");
return NULL;
}
#else
......
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