Fix graphics/present queue assignment

Fixed SwapchainBuilder second constructor, which had 'info.graphics_queue_index = present.value()' and 'info.present_queue_index = graphics.value()'.
This commit is contained in:
rogmatic 2022-12-17 21:02:48 -07:00 committed by Charles Giessen
parent b4b177170e
commit 4462c56349

View File

@ -1716,8 +1716,8 @@ SwapchainBuilder::SwapchainBuilder(Device const& device, VkSurfaceKHR const surf
auto present = temp_device.get_queue_index(QueueType::present); auto present = temp_device.get_queue_index(QueueType::present);
auto graphics = temp_device.get_queue_index(QueueType::graphics); auto graphics = temp_device.get_queue_index(QueueType::graphics);
assert(graphics.has_value() && present.has_value() && "Graphics and Present queue indexes must be valid"); assert(graphics.has_value() && present.has_value() && "Graphics and Present queue indexes must be valid");
info.graphics_queue_index = present.value(); info.graphics_queue_index = graphics.value();
info.present_queue_index = graphics.value(); info.present_queue_index = present.value();
info.allocation_callbacks = device.allocation_callbacks; info.allocation_callbacks = device.allocation_callbacks;
} }
SwapchainBuilder::SwapchainBuilder(VkPhysicalDevice const physical_device, SwapchainBuilder::SwapchainBuilder(VkPhysicalDevice const physical_device,