Function inexor::vulkan_renderer::wrapper::swapchains::choose_array_layers

Function Documentation

std::uint32_t inexor::vulkan_renderer::wrapper::swapchains::choose_array_layers(const VkSurfaceCapabilitiesKHR &caps, std::uint32_t requested_layer_count = 1)

Note

Design decision: It was decided to move all code which deals with finding optimal values for the parameters of swapchain creation and recreation to this file called swapchain_utils, because it reduces the mental complexity of the core swapchain wrapper code, and it helps us to write simple tests for the functions in here. Select the number of swapchain array layers.

Note

The number of swapchain array layers will likely remain 1 unless we start doing using advanced features,

Parameters:
  • caps – The capabilities of the used surface.

  • requested_img_count – The requested number of swapchain array layers.

Returns:

The selected number of swapchain array layers.