mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
vulkan: Remove use of oldSwapchain.
Works around a hang on gamescope. oldSwapchain generally isn't useful after all. Just use the same code paths everywhere.
This commit is contained in:
parent
ccfc7bab1c
commit
ee64f59b18
@ -2202,13 +2202,9 @@ bool vulkan_create_swapchain(gfx_ctx_vulkan_data_t *vk,
|
||||
info.clipped = VK_TRUE;
|
||||
info.oldSwapchain = old_swapchain;
|
||||
|
||||
#ifdef _WIN32
|
||||
/* On Windows, do not try to reuse the swapchain.
|
||||
* It causes a lot of issues on nVidia for some reason. */
|
||||
info.oldSwapchain = VK_NULL_HANDLE;
|
||||
if (old_swapchain != VK_NULL_HANDLE)
|
||||
vkDestroySwapchainKHR(vk->context.device, old_swapchain, NULL);
|
||||
#endif
|
||||
|
||||
if (vkCreateSwapchainKHR(vk->context.device,
|
||||
&info, NULL, &vk->swapchain) != VK_SUCCESS)
|
||||
@ -2217,11 +2213,6 @@ bool vulkan_create_swapchain(gfx_ctx_vulkan_data_t *vk,
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifndef _WIN32
|
||||
if (old_swapchain != VK_NULL_HANDLE)
|
||||
vkDestroySwapchainKHR(vk->context.device, old_swapchain, NULL);
|
||||
#endif
|
||||
|
||||
vk->context.swapchain_width = swapchain_size.width;
|
||||
vk->context.swapchain_height = swapchain_size.height;
|
||||
#ifdef VULKAN_HDR_SWAPCHAIN
|
||||
|
Loading…
x
Reference in New Issue
Block a user