mirror of
https://github.com/charles-lunarg/vk-bootstrap.git
synced 2024-11-10 02:41:47 +00:00
Assert in SwapchainBuilder on queue getting failure
This resolves the TODO about what to do if the queues couldn't be found.
This commit is contained in:
parent
84ba7a79ee
commit
70265d8b29
@ -1607,7 +1607,7 @@ SwapchainBuilder::SwapchainBuilder(Device const& device) {
|
||||
info.surface = device.surface;
|
||||
auto present = device.get_queue_index(QueueType::present);
|
||||
auto graphics = device.get_queue_index(QueueType::graphics);
|
||||
// TODO: handle error of queue's not available
|
||||
assert(graphics.has_value() && present.has_value() && "Graphics and Present queue indexes must be valid");
|
||||
info.graphics_queue_index = present.value();
|
||||
info.present_queue_index = graphics.value();
|
||||
info.allocation_callbacks = device.allocation_callbacks;
|
||||
@ -1620,7 +1620,7 @@ SwapchainBuilder::SwapchainBuilder(Device const& device, VkSurfaceKHR const surf
|
||||
temp_device.surface = surface;
|
||||
auto present = temp_device.get_queue_index(QueueType::present);
|
||||
auto graphics = temp_device.get_queue_index(QueueType::graphics);
|
||||
// TODO: handle error of queue's not available
|
||||
assert(graphics.has_value() && present.has_value() && "Graphics and Present queue indexes must be valid");
|
||||
info.graphics_queue_index = present.value();
|
||||
info.present_queue_index = graphics.value();
|
||||
info.allocation_callbacks = device.allocation_callbacks;
|
||||
|
Loading…
Reference in New Issue
Block a user