winex11: Implement vkDestroySurfaceKHR.

Signed-off-by: Roderick Colenbrander <thunderbird2k@gmail.com>
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Roderick Colenbrander 2018-03-12 23:32:05 -07:00 committed by Alexandre Julliard
parent 2d09b4930f
commit 53df81c457
1 changed files with 14 additions and 1 deletions

View File

@ -77,6 +77,12 @@ static const struct VkExtensionProperties winex11_vk_instance_extensions[] =
{ "VK_KHR_win32_surface", 1}, { "VK_KHR_win32_surface", 1},
}; };
/* Helper function to convert VkSurfaceKHR (uint64_t) to a surface pointer. */
static inline struct wine_vk_surface * surface_from_handle(VkSurfaceKHR handle)
{
return ((struct wine_vk_surface *)(uintptr_t)handle);
}
static BOOL wine_vk_init(void) static BOOL wine_vk_init(void)
{ {
static BOOL init_done = FALSE; static BOOL init_done = FALSE;
@ -277,7 +283,14 @@ static void X11DRV_vkDestroyInstance(VkInstance instance, const VkAllocationCall
static void X11DRV_vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, static void X11DRV_vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface,
const VkAllocationCallbacks *allocator) const VkAllocationCallbacks *allocator)
{ {
FIXME("stub: %p 0x%s %p\n", instance, wine_dbgstr_longlong(surface), allocator); struct wine_vk_surface *x11_surface = surface_from_handle(surface);
TRACE("%p 0x%s %p\n", instance, wine_dbgstr_longlong(surface), allocator);
if (allocator)
FIXME("Support for allocation callbacks not implemented yet\n");
wine_vk_surface_destroy(instance, x11_surface);
} }
static void X11DRV_vkDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, static void X11DRV_vkDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain,