mirror of
https://github.com/charles-lunarg/vk-bootstrap.git
synced 2024-11-22 15:24:34 +00:00
Swapchain stores the VkColorSpaceKHR actually used when creating swapchains so users can query the final value
This commit is contained in:
parent
f8573e117c
commit
8d9aea9987
@ -1852,6 +1852,7 @@ detail::Result<Swapchain> SwapchainBuilder::build() const {
|
|||||||
}
|
}
|
||||||
swapchain.device = info.device;
|
swapchain.device = info.device;
|
||||||
swapchain.image_format = surface_format.format;
|
swapchain.image_format = surface_format.format;
|
||||||
|
swapchain.color_space = surface_format.colorSpace;
|
||||||
swapchain.extent = extent;
|
swapchain.extent = extent;
|
||||||
detail::vulkan_functions().get_device_proc_addr(
|
detail::vulkan_functions().get_device_proc_addr(
|
||||||
info.device, swapchain.internal_table.fp_vkGetSwapchainImagesKHR, "vkGetSwapchainImagesKHR");
|
info.device, swapchain.internal_table.fp_vkGetSwapchainImagesKHR, "vkGetSwapchainImagesKHR");
|
||||||
|
@ -752,7 +752,8 @@ struct Swapchain {
|
|||||||
VkDevice device = VK_NULL_HANDLE;
|
VkDevice device = VK_NULL_HANDLE;
|
||||||
VkSwapchainKHR swapchain = VK_NULL_HANDLE;
|
VkSwapchainKHR swapchain = VK_NULL_HANDLE;
|
||||||
uint32_t image_count = 0;
|
uint32_t image_count = 0;
|
||||||
VkFormat image_format = VK_FORMAT_UNDEFINED;
|
VkFormat image_format = VK_FORMAT_UNDEFINED; // THe image format actually used when creating the swapchain.
|
||||||
|
VkColorSpaceKHR color_space = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR; // The color space actually used when creating the swapchain.
|
||||||
VkExtent2D extent = { 0, 0 };
|
VkExtent2D extent = { 0, 0 };
|
||||||
uint32_t requested_min_image_count = 0; // The value of minImageCount actually used when creating the swapchain; note that the presentation engine is always free to create more images than that.
|
uint32_t requested_min_image_count = 0; // The value of minImageCount actually used when creating the swapchain; note that the presentation engine is always free to create more images than that.
|
||||||
VkPresentModeKHR present_mode = VK_PRESENT_MODE_IMMEDIATE_KHR; // The present mode actually used when creating the swapchain.
|
VkPresentModeKHR present_mode = VK_PRESENT_MODE_IMMEDIATE_KHR; // The present mode actually used when creating the swapchain.
|
||||||
|
Loading…
Reference in New Issue
Block a user