Fix desired extensions not being enabled

Regression caused desired extensions to not be added to the device create info structure,
resulting in desired extensions not being enabled.
This commit is contained in:
Charles Giessen 2022-07-16 11:49:26 -06:00
parent d4dba53119
commit aeed599098

View File

@ -984,8 +984,8 @@ uint32_t get_separate_queue_index(
uint32_t get_dedicated_queue_index(
std::vector<VkQueueFamilyProperties> const& families, VkQueueFlags desired_flags, VkQueueFlags undesired_flags) {
for (uint32_t i = 0; i < static_cast<uint32_t>(families.size()); i++) {
if ((families[i].queueFlags & desired_flags) == desired_flags && (families[i].queueFlags & VK_QUEUE_GRAPHICS_BIT) == 0 &&
(families[i].queueFlags & undesired_flags) == 0)
if ((families[i].queueFlags & desired_flags) == desired_flags &&
(families[i].queueFlags & VK_QUEUE_GRAPHICS_BIT) == 0 && (families[i].queueFlags & undesired_flags) == 0)
return i;
}
return QUEUE_INDEX_MAX_VALUE;
@ -1201,10 +1201,11 @@ detail::Result<std::vector<PhysicalDevice>> PhysicalDeviceSelector::select_impl(
if (criteria.enable_portability_subset && ext == "VK_KHR_portability_subset")
portability_ext_available = true;
auto desired_extensions_supported = detail::check_device_extension_support(phys_dev.extensions, criteria.desired_extensions);
phys_dev.extensions.clear();
phys_dev.extensions.insert(
phys_dev.extensions.end(), criteria.required_extensions.begin(), criteria.required_extensions.end());
auto desired_extensions_supported = detail::check_device_extension_support(phys_dev.extensions, criteria.desired_extensions);
phys_dev.extensions.insert(
phys_dev.extensions.end(), desired_extensions_supported.begin(), desired_extensions_supported.end());
if (portability_ext_available) {