Roderick Colenbrander : winex11: Implement vkDestroySurfaceKHR.

Alexandre Julliard julliard at winehq.org
Tue Mar 13 17:10:53 CDT 2018


Module: wine
Branch: master
Commit: 53df81c4570d640dfd5ae78365fbc90d73486f4e
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=53df81c4570d640dfd5ae78365fbc90d73486f4e

Author: Roderick Colenbrander <thunderbird2k at gmail.com>
Date:   Mon Mar 12 23:32:05 2018 -0700

winex11: Implement vkDestroySurfaceKHR.

Signed-off-by: Roderick Colenbrander <thunderbird2k at gmail.com>
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winex11.drv/vulkan.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/dlls/winex11.drv/vulkan.c b/dlls/winex11.drv/vulkan.c
index cdcf741..3828f79 100644
--- a/dlls/winex11.drv/vulkan.c
+++ b/dlls/winex11.drv/vulkan.c
@@ -77,6 +77,12 @@ static const struct VkExtensionProperties winex11_vk_instance_extensions[] =
     { "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 init_done = FALSE;
@@ -277,7 +283,14 @@ static void X11DRV_vkDestroyInstance(VkInstance instance, const VkAllocationCall
 static void X11DRV_vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface,
         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,




More information about the wine-cvs mailing list