[PATCH v2 3/4] winex11: Implement vkDestroySurfaceKHR.
Roderick Colenbrander
thunderbird2k at gmail.com
Tue Mar 13 01:32:05 CDT 2018
Signed-off-by: Roderick Colenbrander <thunderbird2k at gmail.com>
---
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 cdcf741957..3828f799b6 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,
--
2.14.3
More information about the wine-devel
mailing list