On Tue, 2 Apr 2019 at 20:22, Józef Kucia <jkucia(a)codeweavers.com> wrote:
We always build Vulkan backend even when libvulkan is not found. We do the same for winevulkan. We may want to change that.
In principle I think compile testing things is a good thing. Missing libvulkan should be rare enough to make this mostly moot in practice, but I think we'd want to avoid someone touching e.g. struct wined3d_adapter_ops not noticing that they broke the Vulkan adapter until someone else has a chance to review the patch.
@@ -63,17 +123,23 @@ static BOOL wined3d_adapter_vk_init(struct wined3d_adapter_vk *adapter_vk, adapter_vk, ordinal, wined3d_creation_flags);
if (!wined3d_adapter_init(adapter, ordinal)) - return FALSE; + goto fail; ... +fail: + if (vk_info->vk_ops.vkDestroyInstance) + VK_CALL(vkDestroyInstance(vk_info->instance, NULL)); + wined3d_adapter_cleanup(adapter); It's innocent enough in practice, but I don't think we want to call wined3d_adapter_cleanup() when wined3d_adapter_init() failed.