mirror of
https://github.com/charles-lunarg/vk-bootstrap.git
synced 2024-11-22 07:24:34 +00:00
Fix enable_extension_features_if_present on Vulkan 1.0
This method should call vkGetPhysicalDeviceFeatures2KHR on Vulkan 1.0.
This commit is contained in:
parent
5e7be28b43
commit
30a13b23f6
@ -1547,11 +1547,19 @@ bool PhysicalDevice::enable_features_node_if_present(detail::GenericFeaturesPNex
|
||||
actual_pdf2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
|
||||
fill_chain.chain_up(actual_pdf2);
|
||||
|
||||
bool required_features_supported = false;
|
||||
bool instance_is_1_1 = instance_version >= VKB_VK_API_VERSION_1_1;
|
||||
if (instance_is_1_1 || properties2_ext_enabled) {
|
||||
if (instance_is_1_1) {
|
||||
detail::vulkan_functions().fp_vkGetPhysicalDeviceFeatures2(physical_device, &actual_pdf2);
|
||||
bool required_features_supported = fill_chain.match_all(requested_features);
|
||||
} else {
|
||||
detail::vulkan_functions().fp_vkGetPhysicalDeviceFeatures2KHR(physical_device, &actual_pdf2);
|
||||
}
|
||||
required_features_supported = fill_chain.match_all(requested_features);
|
||||
if (required_features_supported) {
|
||||
extended_features_chain.combine(requested_features);
|
||||
}
|
||||
}
|
||||
return required_features_supported;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user