[PATCH v2 0/4] winevulkan

Józef Kucia joseph.kucia at gmail.com
Tue Mar 13 09:32:36 CDT 2018

On Tue, Mar 13, 2018 at 7:32 AM, Roderick Colenbrander
<thunderbird2k at gmail.com> wrote:
> Hi all,
> This is a resubmit of some of my previous patches. I have added a
> surface_from_handle helper function to replace the macro I had.
> The biggest change is initial destroy surface logic using
> wine_vk_surface_destroy. For now I think it is sufficient, though
> long-term it probably needs to be used from X11DRV_DestroyWindow as well,
> but that needs some more thought.

Yes, it's probably sufficient for now. In the long term, we may need
to improve client window management.

> Among the challenges is that vkDestroySurfaceKHR requires the 'VkInstance'
> the surface is tied to, which brings up other complexity (instance may
> have been destroyed already, locking, does VkDestroyInstance need to clean
> up undestroyed surfaces?). It is not even clear how Vulkan expect things
> to be done as Vulkan kind of assumes 'well written' software since it has very
> minimal error handling and validation.

I don't think we should destroy surfaces in vkDestroyInstance().
Generally, Vulkan requires all objects created from VkDevice to be
destroyed before VkDevice. It also applies to VkInstances.
Unfortunately, the spec doesn't mention WSI objects explicitly in the
"2.3.1. Object Lifetime" section.

> Thanks,
> Roderick
> Roderick Colenbrander (4):
>   winex11: Add initial vkCreateWin32SurfaceKHR implementation.
>   winex11: Implement vkGetPhysicalDeviceWin32PresentationSupportKHR.
>   winex11: Implement vkDestroySurfaceKHR.
>   winex11: Implement support for vkGetPhysicalDeviceSurface*KHR APIs.
>  dlls/winex11.drv/vulkan.c | 153 ++++++++++++++++++++++++++++++++++++++++++----
>  1 file changed, 140 insertions(+), 13 deletions(-)
> --
> 2.14.3

More information about the wine-devel mailing list