From d6ea2ce28c605d5cbd98c180ac90358f87ccef02 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Tue, 7 Dec 2021 12:19:37 +0100 Subject: [PATCH] activate VK_KHR_portability_subset if present in vkvg_device_create --- src/vkvg_device.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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, -- 2.47.3