Fix: portability_enumeration flag was not available before 1.3.208

This commit is contained in:
spnda 2022-04-30 14:53:30 +02:00 committed by Charles Giessen
parent fafc735714
commit bf4e2f073b

View File

@ -710,9 +710,11 @@ detail::Result<Instance> InstanceBuilder::build() const {
instance_create_info.ppEnabledExtensionNames = extensions.data();
instance_create_info.enabledLayerCount = static_cast<uint32_t>(layers.size());
instance_create_info.ppEnabledLayerNames = layers.data();
#if defined(VK_KHR_portability_enumeration)
if (portability_enumeration_support) {
instance_create_info.flags |= VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR;
}
#endif
Instance instance;
VkResult res =