winevulkan: Remove now unnecessary vkDestroyInstance driver entry.
This commit is contained in:
parent
a875c18552
commit
69b049d1b6
10 changed files with 13 additions and 49 deletions
|
@ -78,6 +78,7 @@ static void d3dkmt_init_vulkan(void)
|
||||||
.enabledExtensionCount = ARRAY_SIZE( extensions ),
|
.enabledExtensionCount = ARRAY_SIZE( extensions ),
|
||||||
.ppEnabledExtensionNames = extensions,
|
.ppEnabledExtensionNames = extensions,
|
||||||
};
|
};
|
||||||
|
PFN_vkDestroyInstance p_vkDestroyInstance;
|
||||||
PFN_vkCreateInstance p_vkCreateInstance;
|
PFN_vkCreateInstance p_vkCreateInstance;
|
||||||
VkResult vr;
|
VkResult vr;
|
||||||
|
|
||||||
|
@ -95,11 +96,12 @@ static void d3dkmt_init_vulkan(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p_vkDestroyInstance = vulkan_funcs->p_vkGetInstanceProcAddr( d3dkmt_vk_instance, "vkDestroyInstance" );
|
||||||
#define LOAD_VK_FUNC( f ) \
|
#define LOAD_VK_FUNC( f ) \
|
||||||
if (!(p##f = (void *)vulkan_funcs->p_vkGetInstanceProcAddr( d3dkmt_vk_instance, #f ))) \
|
if (!(p##f = (void *)vulkan_funcs->p_vkGetInstanceProcAddr( d3dkmt_vk_instance, #f ))) \
|
||||||
{ \
|
{ \
|
||||||
WARN( "Failed to load " #f ".\n" ); \
|
WARN( "Failed to load " #f ".\n" ); \
|
||||||
vulkan_funcs->p_vkDestroyInstance( d3dkmt_vk_instance, NULL ); \
|
p_vkDestroyInstance( d3dkmt_vk_instance, NULL ); \
|
||||||
vulkan_funcs = NULL; \
|
vulkan_funcs = NULL; \
|
||||||
return; \
|
return; \
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,6 @@ static void *win32u_vkGetInstanceProcAddr( VkInstance instance, const char *name
|
||||||
if (!instance) return p_vkGetInstanceProcAddr( instance, name );
|
if (!instance) return p_vkGetInstanceProcAddr( instance, name );
|
||||||
|
|
||||||
if (!strcmp( name, "vkCreateWin32SurfaceKHR" )) return vulkan_funcs.p_vkCreateWin32SurfaceKHR;
|
if (!strcmp( name, "vkCreateWin32SurfaceKHR" )) return vulkan_funcs.p_vkCreateWin32SurfaceKHR;
|
||||||
if (!strcmp( name, "vkDestroyInstance" )) return vulkan_funcs.p_vkDestroyInstance;
|
|
||||||
if (!strcmp( name, "vkDestroySurfaceKHR" )) return vulkan_funcs.p_vkDestroySurfaceKHR;
|
if (!strcmp( name, "vkDestroySurfaceKHR" )) return vulkan_funcs.p_vkDestroySurfaceKHR;
|
||||||
if (!strcmp( name, "vkGetInstanceProcAddr" )) return win32u_vkGetInstanceProcAddr;
|
if (!strcmp( name, "vkGetInstanceProcAddr" )) return win32u_vkGetInstanceProcAddr;
|
||||||
if (!strcmp( name, "vkGetPhysicalDeviceWin32PresentationSupportKHR" )) return vulkan_funcs.p_vkGetPhysicalDeviceWin32PresentationSupportKHR;
|
if (!strcmp( name, "vkGetPhysicalDeviceWin32PresentationSupportKHR" )) return vulkan_funcs.p_vkGetPhysicalDeviceWin32PresentationSupportKHR;
|
||||||
|
|
|
@ -80,7 +80,6 @@ typedef struct VkMetalSurfaceCreateInfoEXT
|
||||||
static VkResult (*pvkCreateSwapchainKHR)(VkDevice, const VkSwapchainCreateInfoKHR *, const VkAllocationCallbacks *, VkSwapchainKHR *);
|
static VkResult (*pvkCreateSwapchainKHR)(VkDevice, const VkSwapchainCreateInfoKHR *, const VkAllocationCallbacks *, VkSwapchainKHR *);
|
||||||
static VkResult (*pvkCreateMacOSSurfaceMVK)(VkInstance, const VkMacOSSurfaceCreateInfoMVK*, const VkAllocationCallbacks *, VkSurfaceKHR *);
|
static VkResult (*pvkCreateMacOSSurfaceMVK)(VkInstance, const VkMacOSSurfaceCreateInfoMVK*, const VkAllocationCallbacks *, VkSurfaceKHR *);
|
||||||
static VkResult (*pvkCreateMetalSurfaceEXT)(VkInstance, const VkMetalSurfaceCreateInfoEXT*, const VkAllocationCallbacks *, VkSurfaceKHR *);
|
static VkResult (*pvkCreateMetalSurfaceEXT)(VkInstance, const VkMetalSurfaceCreateInfoEXT*, const VkAllocationCallbacks *, VkSurfaceKHR *);
|
||||||
static void (*pvkDestroyInstance)(VkInstance, const VkAllocationCallbacks *);
|
|
||||||
static void (*pvkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *);
|
static void (*pvkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *);
|
||||||
static void (*pvkDestroySwapchainKHR)(VkDevice, VkSwapchainKHR, const VkAllocationCallbacks *);
|
static void (*pvkDestroySwapchainKHR)(VkDevice, VkSwapchainKHR, const VkAllocationCallbacks *);
|
||||||
static VkResult (*pvkGetPhysicalDeviceSurfaceCapabilities2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *, VkSurfaceCapabilities2KHR *);
|
static VkResult (*pvkGetPhysicalDeviceSurfaceCapabilities2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *, VkSurfaceCapabilities2KHR *);
|
||||||
|
@ -207,16 +206,6 @@ err:
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void macdrv_vkDestroyInstance(VkInstance instance, const VkAllocationCallbacks *allocator)
|
|
||||||
{
|
|
||||||
TRACE("%p %p\n", instance, allocator);
|
|
||||||
|
|
||||||
if (allocator)
|
|
||||||
FIXME("Support for allocation callbacks not implemented yet\n");
|
|
||||||
|
|
||||||
pvkDestroyInstance(instance, NULL /* allocator */);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void macdrv_vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface,
|
static void macdrv_vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface,
|
||||||
const VkAllocationCallbacks *allocator)
|
const VkAllocationCallbacks *allocator)
|
||||||
{
|
{
|
||||||
|
@ -303,7 +292,6 @@ static const struct vulkan_funcs vulkan_funcs =
|
||||||
{
|
{
|
||||||
macdrv_vkCreateSwapchainKHR,
|
macdrv_vkCreateSwapchainKHR,
|
||||||
macdrv_vkCreateWin32SurfaceKHR,
|
macdrv_vkCreateWin32SurfaceKHR,
|
||||||
macdrv_vkDestroyInstance,
|
|
||||||
macdrv_vkDestroySurfaceKHR,
|
macdrv_vkDestroySurfaceKHR,
|
||||||
macdrv_vkDestroySwapchainKHR,
|
macdrv_vkDestroySwapchainKHR,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -328,7 +316,6 @@ UINT macdrv_VulkanInit(UINT version, void *vulkan_handle, struct vulkan_funcs *d
|
||||||
LOAD_FUNCPTR(vkCreateSwapchainKHR)
|
LOAD_FUNCPTR(vkCreateSwapchainKHR)
|
||||||
LOAD_FUNCPTR(vkCreateMacOSSurfaceMVK)
|
LOAD_FUNCPTR(vkCreateMacOSSurfaceMVK)
|
||||||
LOAD_FUNCPTR(vkCreateMetalSurfaceEXT)
|
LOAD_FUNCPTR(vkCreateMetalSurfaceEXT)
|
||||||
LOAD_FUNCPTR(vkDestroyInstance)
|
|
||||||
LOAD_FUNCPTR(vkDestroySurfaceKHR)
|
LOAD_FUNCPTR(vkDestroySurfaceKHR)
|
||||||
LOAD_FUNCPTR(vkDestroySwapchainKHR)
|
LOAD_FUNCPTR(vkDestroySwapchainKHR)
|
||||||
LOAD_FUNCPTR(vkGetSwapchainImagesKHR)
|
LOAD_FUNCPTR(vkGetSwapchainImagesKHR)
|
||||||
|
|
|
@ -175,7 +175,6 @@ FUNCTION_OVERRIDES = {
|
||||||
|
|
||||||
# Instance functions
|
# Instance functions
|
||||||
"vkCreateDevice" : {"extra_param" : "client_ptr"},
|
"vkCreateDevice" : {"extra_param" : "client_ptr"},
|
||||||
"vkDestroyInstance" : {"dispatch" : False},
|
|
||||||
"vkGetPhysicalDeviceExternalBufferProperties" : {"dispatch" : False},
|
"vkGetPhysicalDeviceExternalBufferProperties" : {"dispatch" : False},
|
||||||
"vkGetPhysicalDeviceExternalFenceProperties" : {"dispatch" : False},
|
"vkGetPhysicalDeviceExternalFenceProperties" : {"dispatch" : False},
|
||||||
"vkGetPhysicalDeviceExternalSemaphoreProperties" : {"dispatch" : False},
|
"vkGetPhysicalDeviceExternalSemaphoreProperties" : {"dispatch" : False},
|
||||||
|
@ -198,7 +197,6 @@ FUNCTION_OVERRIDES = {
|
||||||
USER_DRIVER_FUNCS = {
|
USER_DRIVER_FUNCS = {
|
||||||
"vkCreateSwapchainKHR",
|
"vkCreateSwapchainKHR",
|
||||||
"vkCreateWin32SurfaceKHR",
|
"vkCreateWin32SurfaceKHR",
|
||||||
"vkDestroyInstance",
|
|
||||||
"vkDestroySurfaceKHR",
|
"vkDestroySurfaceKHR",
|
||||||
"vkDestroySwapchainKHR",
|
"vkDestroySwapchainKHR",
|
||||||
"vkGetDeviceProcAddr",
|
"vkGetDeviceProcAddr",
|
||||||
|
|
|
@ -912,7 +912,7 @@ VkResult wine_vkCreateInstance(const VkInstanceCreateInfo *create_info,
|
||||||
if (res != VK_SUCCESS)
|
if (res != VK_SUCCESS)
|
||||||
{
|
{
|
||||||
ERR("Failed to load physical devices, res=%d\n", res);
|
ERR("Failed to load physical devices, res=%d\n", res);
|
||||||
vk_funcs->p_vkDestroyInstance(object->host_instance, NULL /* allocator */);
|
object->funcs.p_vkDestroyInstance(object->host_instance, NULL /* allocator */);
|
||||||
free(object->utils_messengers);
|
free(object->utils_messengers);
|
||||||
free(object);
|
free(object);
|
||||||
return res;
|
return res;
|
||||||
|
@ -976,7 +976,7 @@ void wine_vkDestroyInstance(VkInstance handle, const VkAllocationCallbacks *allo
|
||||||
if (!instance)
|
if (!instance)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
vk_funcs->p_vkDestroyInstance(instance->host_instance, NULL /* allocator */);
|
instance->funcs.p_vkDestroyInstance(instance->host_instance, NULL /* allocator */);
|
||||||
for (i = 0; i < instance->phys_dev_count; i++)
|
for (i = 0; i < instance->phys_dev_count; i++)
|
||||||
{
|
{
|
||||||
remove_handle_mapping(instance, &instance->phys_devs[i].wrapper_entry);
|
remove_handle_mapping(instance, &instance->phys_devs[i].wrapper_entry);
|
||||||
|
|
|
@ -591,6 +591,7 @@ struct vulkan_instance_funcs
|
||||||
void (*p_vkDebugReportMessageEXT)(VkInstance, VkDebugReportFlagsEXT, VkDebugReportObjectTypeEXT, uint64_t, size_t, int32_t, const char *, const char *);
|
void (*p_vkDebugReportMessageEXT)(VkInstance, VkDebugReportFlagsEXT, VkDebugReportObjectTypeEXT, uint64_t, size_t, int32_t, const char *, const char *);
|
||||||
void (*p_vkDestroyDebugReportCallbackEXT)(VkInstance, VkDebugReportCallbackEXT, const VkAllocationCallbacks *);
|
void (*p_vkDestroyDebugReportCallbackEXT)(VkInstance, VkDebugReportCallbackEXT, const VkAllocationCallbacks *);
|
||||||
void (*p_vkDestroyDebugUtilsMessengerEXT)(VkInstance, VkDebugUtilsMessengerEXT, const VkAllocationCallbacks *);
|
void (*p_vkDestroyDebugUtilsMessengerEXT)(VkInstance, VkDebugUtilsMessengerEXT, const VkAllocationCallbacks *);
|
||||||
|
void (*p_vkDestroyInstance)(VkInstance, const VkAllocationCallbacks *);
|
||||||
void (*p_vkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *);
|
void (*p_vkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *);
|
||||||
VkResult (*p_vkEnumeratePhysicalDeviceGroups)(VkInstance, uint32_t *, VkPhysicalDeviceGroupProperties *);
|
VkResult (*p_vkEnumeratePhysicalDeviceGroups)(VkInstance, uint32_t *, VkPhysicalDeviceGroupProperties *);
|
||||||
VkResult (*p_vkEnumeratePhysicalDeviceGroupsKHR)(VkInstance, uint32_t *, VkPhysicalDeviceGroupProperties *);
|
VkResult (*p_vkEnumeratePhysicalDeviceGroupsKHR)(VkInstance, uint32_t *, VkPhysicalDeviceGroupProperties *);
|
||||||
|
@ -1161,6 +1162,7 @@ struct vulkan_instance_funcs
|
||||||
USE_VK_FUNC(vkDebugReportMessageEXT) \
|
USE_VK_FUNC(vkDebugReportMessageEXT) \
|
||||||
USE_VK_FUNC(vkDestroyDebugReportCallbackEXT) \
|
USE_VK_FUNC(vkDestroyDebugReportCallbackEXT) \
|
||||||
USE_VK_FUNC(vkDestroyDebugUtilsMessengerEXT) \
|
USE_VK_FUNC(vkDestroyDebugUtilsMessengerEXT) \
|
||||||
|
USE_VK_FUNC(vkDestroyInstance) \
|
||||||
USE_VK_FUNC(vkDestroySurfaceKHR) \
|
USE_VK_FUNC(vkDestroySurfaceKHR) \
|
||||||
USE_VK_FUNC(vkEnumeratePhysicalDeviceGroups) \
|
USE_VK_FUNC(vkEnumeratePhysicalDeviceGroups) \
|
||||||
USE_VK_FUNC(vkEnumeratePhysicalDeviceGroupsKHR) \
|
USE_VK_FUNC(vkEnumeratePhysicalDeviceGroupsKHR) \
|
||||||
|
|
|
@ -55,7 +55,6 @@ typedef struct VkWaylandSurfaceCreateInfoKHR
|
||||||
|
|
||||||
static VkResult (*pvkCreateSwapchainKHR)(VkDevice, const VkSwapchainCreateInfoKHR *, const VkAllocationCallbacks *, VkSwapchainKHR *);
|
static VkResult (*pvkCreateSwapchainKHR)(VkDevice, const VkSwapchainCreateInfoKHR *, const VkAllocationCallbacks *, VkSwapchainKHR *);
|
||||||
static VkResult (*pvkCreateWaylandSurfaceKHR)(VkInstance, const VkWaylandSurfaceCreateInfoKHR *, const VkAllocationCallbacks *, VkSurfaceKHR *);
|
static VkResult (*pvkCreateWaylandSurfaceKHR)(VkInstance, const VkWaylandSurfaceCreateInfoKHR *, const VkAllocationCallbacks *, VkSurfaceKHR *);
|
||||||
static void (*pvkDestroyInstance)(VkInstance, const VkAllocationCallbacks *);
|
|
||||||
static void (*pvkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *);
|
static void (*pvkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *);
|
||||||
static void (*pvkDestroySwapchainKHR)(VkDevice, VkSwapchainKHR, const VkAllocationCallbacks *);
|
static void (*pvkDestroySwapchainKHR)(VkDevice, VkSwapchainKHR, const VkAllocationCallbacks *);
|
||||||
static VkBool32 (*pvkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice, uint32_t, struct wl_display *);
|
static VkBool32 (*pvkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice, uint32_t, struct wl_display *);
|
||||||
|
@ -322,17 +321,6 @@ err:
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void wayland_vkDestroyInstance(VkInstance instance,
|
|
||||||
const VkAllocationCallbacks *allocator)
|
|
||||||
{
|
|
||||||
TRACE("%p %p\n", instance, allocator);
|
|
||||||
|
|
||||||
if (allocator)
|
|
||||||
FIXME("Support for allocation callbacks not implemented yet\n");
|
|
||||||
|
|
||||||
pvkDestroyInstance(instance, NULL /* allocator */);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void wayland_vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface,
|
static void wayland_vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface,
|
||||||
const VkAllocationCallbacks *allocator)
|
const VkAllocationCallbacks *allocator)
|
||||||
{
|
{
|
||||||
|
@ -411,7 +399,6 @@ static const struct vulkan_funcs vulkan_funcs =
|
||||||
{
|
{
|
||||||
.p_vkCreateSwapchainKHR = wayland_vkCreateSwapchainKHR,
|
.p_vkCreateSwapchainKHR = wayland_vkCreateSwapchainKHR,
|
||||||
.p_vkCreateWin32SurfaceKHR = wayland_vkCreateWin32SurfaceKHR,
|
.p_vkCreateWin32SurfaceKHR = wayland_vkCreateWin32SurfaceKHR,
|
||||||
.p_vkDestroyInstance = wayland_vkDestroyInstance,
|
|
||||||
.p_vkDestroySurfaceKHR = wayland_vkDestroySurfaceKHR,
|
.p_vkDestroySurfaceKHR = wayland_vkDestroySurfaceKHR,
|
||||||
.p_vkDestroySwapchainKHR = wayland_vkDestroySwapchainKHR,
|
.p_vkDestroySwapchainKHR = wayland_vkDestroySwapchainKHR,
|
||||||
.p_vkGetPhysicalDeviceWin32PresentationSupportKHR = wayland_vkGetPhysicalDeviceWin32PresentationSupportKHR,
|
.p_vkGetPhysicalDeviceWin32PresentationSupportKHR = wayland_vkGetPhysicalDeviceWin32PresentationSupportKHR,
|
||||||
|
@ -435,7 +422,6 @@ UINT WAYLAND_VulkanInit(UINT version, void *vulkan_handle, struct vulkan_funcs *
|
||||||
#define LOAD_FUNCPTR(f) if (!(p##f = dlsym(vulkan_handle, #f))) return STATUS_PROCEDURE_NOT_FOUND;
|
#define LOAD_FUNCPTR(f) if (!(p##f = dlsym(vulkan_handle, #f))) return STATUS_PROCEDURE_NOT_FOUND;
|
||||||
LOAD_FUNCPTR(vkCreateSwapchainKHR);
|
LOAD_FUNCPTR(vkCreateSwapchainKHR);
|
||||||
LOAD_FUNCPTR(vkCreateWaylandSurfaceKHR);
|
LOAD_FUNCPTR(vkCreateWaylandSurfaceKHR);
|
||||||
LOAD_FUNCPTR(vkDestroyInstance);
|
|
||||||
LOAD_FUNCPTR(vkDestroySurfaceKHR);
|
LOAD_FUNCPTR(vkDestroySurfaceKHR);
|
||||||
LOAD_FUNCPTR(vkDestroySwapchainKHR);
|
LOAD_FUNCPTR(vkDestroySwapchainKHR);
|
||||||
LOAD_FUNCPTR(vkGetPhysicalDeviceWaylandPresentationSupportKHR);
|
LOAD_FUNCPTR(vkGetPhysicalDeviceWaylandPresentationSupportKHR);
|
||||||
|
|
|
@ -78,7 +78,6 @@ typedef struct VkXlibSurfaceCreateInfoKHR
|
||||||
|
|
||||||
static VkResult (*pvkCreateSwapchainKHR)(VkDevice, const VkSwapchainCreateInfoKHR *, const VkAllocationCallbacks *, VkSwapchainKHR *);
|
static VkResult (*pvkCreateSwapchainKHR)(VkDevice, const VkSwapchainCreateInfoKHR *, const VkAllocationCallbacks *, VkSwapchainKHR *);
|
||||||
static VkResult (*pvkCreateXlibSurfaceKHR)(VkInstance, const VkXlibSurfaceCreateInfoKHR *, const VkAllocationCallbacks *, VkSurfaceKHR *);
|
static VkResult (*pvkCreateXlibSurfaceKHR)(VkInstance, const VkXlibSurfaceCreateInfoKHR *, const VkAllocationCallbacks *, VkSurfaceKHR *);
|
||||||
static void (*pvkDestroyInstance)(VkInstance, const VkAllocationCallbacks *);
|
|
||||||
static void (*pvkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *);
|
static void (*pvkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *);
|
||||||
static void (*pvkDestroySwapchainKHR)(VkDevice, VkSwapchainKHR, const VkAllocationCallbacks *);
|
static void (*pvkDestroySwapchainKHR)(VkDevice, VkSwapchainKHR, const VkAllocationCallbacks *);
|
||||||
static VkBool32 (*pvkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice, uint32_t, Display *, VisualID);
|
static VkBool32 (*pvkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice, uint32_t, Display *, VisualID);
|
||||||
|
@ -237,16 +236,6 @@ err:
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void X11DRV_vkDestroyInstance(VkInstance instance, const VkAllocationCallbacks *allocator)
|
|
||||||
{
|
|
||||||
TRACE("%p %p\n", instance, allocator);
|
|
||||||
|
|
||||||
if (allocator)
|
|
||||||
FIXME("Support for allocation callbacks not implemented yet\n");
|
|
||||||
|
|
||||||
pvkDestroyInstance(instance, NULL /* allocator */);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void X11DRV_vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface,
|
static void X11DRV_vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface,
|
||||||
const VkAllocationCallbacks *allocator)
|
const VkAllocationCallbacks *allocator)
|
||||||
{
|
{
|
||||||
|
@ -338,7 +327,6 @@ static const struct vulkan_funcs vulkan_funcs =
|
||||||
{
|
{
|
||||||
X11DRV_vkCreateSwapchainKHR,
|
X11DRV_vkCreateSwapchainKHR,
|
||||||
X11DRV_vkCreateWin32SurfaceKHR,
|
X11DRV_vkCreateWin32SurfaceKHR,
|
||||||
X11DRV_vkDestroyInstance,
|
|
||||||
X11DRV_vkDestroySurfaceKHR,
|
X11DRV_vkDestroySurfaceKHR,
|
||||||
X11DRV_vkDestroySwapchainKHR,
|
X11DRV_vkDestroySwapchainKHR,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -364,7 +352,6 @@ UINT X11DRV_VulkanInit( UINT version, void *vulkan_handle, struct vulkan_funcs *
|
||||||
#define LOAD_FUNCPTR( f ) if (!(p##f = dlsym( vulkan_handle, #f ))) return STATUS_PROCEDURE_NOT_FOUND;
|
#define LOAD_FUNCPTR( f ) if (!(p##f = dlsym( vulkan_handle, #f ))) return STATUS_PROCEDURE_NOT_FOUND;
|
||||||
LOAD_FUNCPTR( vkCreateSwapchainKHR );
|
LOAD_FUNCPTR( vkCreateSwapchainKHR );
|
||||||
LOAD_FUNCPTR( vkCreateXlibSurfaceKHR );
|
LOAD_FUNCPTR( vkCreateXlibSurfaceKHR );
|
||||||
LOAD_FUNCPTR( vkDestroyInstance );
|
|
||||||
LOAD_FUNCPTR( vkDestroySurfaceKHR );
|
LOAD_FUNCPTR( vkDestroySurfaceKHR );
|
||||||
LOAD_FUNCPTR( vkDestroySwapchainKHR );
|
LOAD_FUNCPTR( vkDestroySwapchainKHR );
|
||||||
LOAD_FUNCPTR( vkGetPhysicalDeviceXlibPresentationSupportKHR );
|
LOAD_FUNCPTR( vkGetPhysicalDeviceXlibPresentationSupportKHR );
|
||||||
|
|
|
@ -758,7 +758,11 @@ static BOOL get_gpu_properties_from_vulkan( struct gdi_gpu *gpu, const XRRProvid
|
||||||
done:
|
done:
|
||||||
free( vk_physical_devices );
|
free( vk_physical_devices );
|
||||||
if (vk_instance)
|
if (vk_instance)
|
||||||
vulkan_funcs->p_vkDestroyInstance( vk_instance, NULL );
|
{
|
||||||
|
PFN_vkDestroyInstance p_vkDestroyInstance;
|
||||||
|
p_vkDestroyInstance = vulkan_funcs->p_vkGetInstanceProcAddr( vk_instance, "vkDestroyInstance" );
|
||||||
|
p_vkDestroyInstance( vk_instance, NULL );
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define __WINE_VULKAN_DRIVER_H
|
#define __WINE_VULKAN_DRIVER_H
|
||||||
|
|
||||||
/* Wine internal vulkan driver version, needs to be bumped upon vulkan_funcs changes. */
|
/* Wine internal vulkan driver version, needs to be bumped upon vulkan_funcs changes. */
|
||||||
#define WINE_VULKAN_DRIVER_VERSION 21
|
#define WINE_VULKAN_DRIVER_VERSION 22
|
||||||
|
|
||||||
struct vulkan_funcs
|
struct vulkan_funcs
|
||||||
{
|
{
|
||||||
|
@ -31,7 +31,6 @@ struct vulkan_funcs
|
||||||
*/
|
*/
|
||||||
VkResult (*p_vkCreateSwapchainKHR)(VkDevice, const VkSwapchainCreateInfoKHR *, const VkAllocationCallbacks *, VkSwapchainKHR *);
|
VkResult (*p_vkCreateSwapchainKHR)(VkDevice, const VkSwapchainCreateInfoKHR *, const VkAllocationCallbacks *, VkSwapchainKHR *);
|
||||||
VkResult (*p_vkCreateWin32SurfaceKHR)(VkInstance, const VkWin32SurfaceCreateInfoKHR *, const VkAllocationCallbacks *, VkSurfaceKHR *);
|
VkResult (*p_vkCreateWin32SurfaceKHR)(VkInstance, const VkWin32SurfaceCreateInfoKHR *, const VkAllocationCallbacks *, VkSurfaceKHR *);
|
||||||
void (*p_vkDestroyInstance)(VkInstance, const VkAllocationCallbacks *);
|
|
||||||
void (*p_vkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *);
|
void (*p_vkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *);
|
||||||
void (*p_vkDestroySwapchainKHR)(VkDevice, VkSwapchainKHR, const VkAllocationCallbacks *);
|
void (*p_vkDestroySwapchainKHR)(VkDevice, VkSwapchainKHR, const VkAllocationCallbacks *);
|
||||||
void * (*p_vkGetDeviceProcAddr)(VkDevice, const char *);
|
void * (*p_vkGetDeviceProcAddr)(VkDevice, const char *);
|
||||||
|
|
Loading…
Add table
Reference in a new issue