GS/VK: Provide VkSwapchainPresentModesCreateInfo as per best practices

This commit is contained in:
TheLastRar
2026-02-09 17:49:32 +01:00
committed by lightningterror
parent 815a59b6ed
commit fcb1d4ff4e
+5 -1
View File
@@ -379,8 +379,12 @@ bool VKSwapChain::CreateSwapChain()
m_swap_chain = VK_NULL_HANDLE;
// VK_EXT_swapchain_maintenance1 types/enums are aliases of VK_KHR_swapchain_maintenance1 types/enums.
const VkSwapchainPresentModesCreateInfoKHR modes_info{VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODES_CREATE_INFO_KHR, nullptr, 1u, &m_present_mode};
// Now we can actually create the swap chain
VkSwapchainCreateInfoKHR swap_chain_info = {VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR, nullptr, 0, m_surface,
VkSwapchainCreateInfoKHR swap_chain_info = {VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR,
GSDeviceVK::GetInstance()->GetOptionalExtensions().vk_swapchain_maintenance1 ? &modes_info : nullptr, 0, m_surface,
image_count, surface_format->format, surface_format->colorSpace, size, 1u, image_usage,
VK_SHARING_MODE_EXCLUSIVE, 0, nullptr, transform, alpha, m_present_mode, VK_TRUE, old_swap_chain};
std::array<uint32_t, 2> indices = {{