mirror of
https://github.com/charles-lunarg/vk-bootstrap.git
synced 2024-11-26 00:34:35 +00:00
Add default gotten queues test for swapchain builder
This commit is contained in:
parent
988c0ea4e4
commit
947afe55c0
@ -127,7 +127,7 @@ TEST_CASE ("Device Configuration", "[VkBootstrap.bootstrap]") {
|
||||
auto window = create_window_glfw ("Device Configuration");
|
||||
vkb::InstanceBuilder builder;
|
||||
|
||||
auto instance_ret = builder.request_validation_layers ().require_api_version(1,1).build ();
|
||||
auto instance_ret = builder.request_validation_layers ().require_api_version (1, 1).build ();
|
||||
REQUIRE (instance_ret.has_value ());
|
||||
auto surface = create_surface_glfw (instance_ret.value ().instance, window);
|
||||
|
||||
@ -279,6 +279,19 @@ TEST_CASE ("Swapchain", "[VkBootstrap.bootstrap]") {
|
||||
|
||||
vkb::destroy_swapchain (recreated_swapchain_ret.value ());
|
||||
}
|
||||
AND_THEN ("Swapchain can be create with default gotten handles") {
|
||||
vkb::SwapchainBuilder swapchain_builder (
|
||||
device.physical_device.physical_device, device.device, surface);
|
||||
auto swapchain_ret = swapchain_builder.build ();
|
||||
REQUIRE (swapchain_ret.has_value ());
|
||||
|
||||
auto swapchain = swapchain_ret.value ();
|
||||
|
||||
auto recreated_swapchain_ret = swapchain_builder.set_old_swapchain (swapchain).build ();
|
||||
REQUIRE (recreated_swapchain_ret.has_value ());
|
||||
|
||||
vkb::destroy_swapchain (recreated_swapchain_ret.value ());
|
||||
}
|
||||
|
||||
vkb::destroy_device (device_ret.value ());
|
||||
destroy_surface (instance_ret, surface);
|
||||
|
Loading…
Reference in New Issue
Block a user