[PATCH 0/3] MR5201: winex11, winemac, winewayland: Remove vkDestroySurfaceKHR NULL checks.
I think these are unnecessary, as `wine_vkDestroySurfaceKHR` already checks for it in winevulkan. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5201
From: Rémi Bernon <rbernon(a)codeweavers.com> --- dlls/winex11.drv/vulkan.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/dlls/winex11.drv/vulkan.c b/dlls/winex11.drv/vulkan.c index e8bcc09e3e2..1c3c70dbd27 100644 --- a/dlls/winex11.drv/vulkan.c +++ b/dlls/winex11.drv/vulkan.c @@ -372,13 +372,8 @@ static void X11DRV_vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface if (allocator) FIXME("Support for allocation callbacks not implemented yet\n"); - /* vkDestroySurfaceKHR must handle VK_NULL_HANDLE (0) for surface. */ - if (x11_surface) - { - pvkDestroySurfaceKHR( instance, x11_surface->host_surface, NULL /* allocator */ ); - - wine_vk_surface_release(x11_surface); - } + pvkDestroySurfaceKHR( instance, x11_surface->host_surface, NULL /* allocator */ ); + wine_vk_surface_release(x11_surface); } static void X11DRV_vkDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5201
From: Rémi Bernon <rbernon(a)codeweavers.com> --- dlls/winemac.drv/vulkan.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/dlls/winemac.drv/vulkan.c b/dlls/winemac.drv/vulkan.c index 86792692d42..05e7412d4c3 100644 --- a/dlls/winemac.drv/vulkan.c +++ b/dlls/winemac.drv/vulkan.c @@ -179,10 +179,6 @@ static VkResult wine_vk_instance_convert_create_info(const VkInstanceCreateInfo static void wine_vk_surface_destroy(VkInstance instance, struct wine_vk_surface *surface) { - /* vkDestroySurfaceKHR must handle VK_NULL_HANDLE (0) for surface. */ - if (!surface) - return; - pvkDestroySurfaceKHR(instance, surface->host_surface, NULL /* allocator */); if (surface->view) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5201
From: Rémi Bernon <rbernon(a)codeweavers.com> --- dlls/winewayland.drv/vulkan.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/dlls/winewayland.drv/vulkan.c b/dlls/winewayland.drv/vulkan.c index 323563192ff..c3cdf143598 100644 --- a/dlls/winewayland.drv/vulkan.c +++ b/dlls/winewayland.drv/vulkan.c @@ -427,9 +427,6 @@ static void wayland_vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surfac if (allocator) FIXME("Support for allocation callbacks not implemented yet\n"); - /* vkDestroySurfaceKHR must handle VK_NULL_HANDLE (0) for surface. */ - if (!wine_vk_surface) return; - pvkDestroySurfaceKHR(instance, wine_vk_surface->host_surface, NULL /* allocator */); wine_vk_surface_destroy(wine_vk_surface); } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5201
participants (1)
-
Rémi Bernon