From: Jean-Philippe Bruyère Date: Tue, 7 Dec 2021 11:19:37 +0000 (+0100) Subject: activate VK_KHR_portability_subset if present in vkvg_device_create X-Git-Tag: v0.2.0~43 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=d6ea2ce28c605d5cbd98c180ac90358f87ccef02;p=jp%2Fvkvg.git activate VK_KHR_portability_subset if present in vkvg_device_create --- diff --git a/src/vkvg_device.c b/src/vkvg_device.c index 49b893b..1363f9a 100644 --- a/src/vkvg_device.c +++ b/src/vkvg_device.c @@ -63,7 +63,12 @@ VkvgDevice vkvg_device_create(VkSampleCountFlags samples, bool deferredResolve) }; enabledExtsCount=0; - //enabledExts[enabledExtsCount++] = "VK_KHR_swapchain"; + //https://vulkan.lunarg.com/doc/view/1.2.162.0/mac/1.2-extensions/vkspec.html#VK_KHR_portability_subset + if (vkh_phyinfo_try_get_extension_properties(pi, "VK_KHR_get_physical_device_properties2", NULL) && + vkh_phyinfo_try_get_extension_properties(pi, "VK_KHR_portability_subset", NULL)) { + enabledExts[enabledExtsCount++] = "VK_KHR_get_physical_device_properties2"; + enabledExts[enabledExtsCount++] = "VK_KHR_portability_subset"; + } VkDeviceCreateInfo device_info = { .sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO, .queueCreateInfoCount = qCount,