]> O.S.I.I.S - jp/vkvg.git/commitdiff
activate VK_KHR_portability_subset if present in vkvg_device_create
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Tue, 7 Dec 2021 11:19:37 +0000 (12:19 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Tue, 7 Dec 2021 11:19:37 +0000 (12:19 +0100)
src/vkvg_device.c

index 49b893b06e2a691eabace202d76c0810c5e219dd..1363f9a2f1b8623b05e6c4644b22a00132b4cd25 100644 (file)
@@ -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,