Deletes Vulkan resources on swapchain recreation

The change tries to minimize a memory peak during a window resizing.

Refs #6864

(cherry picked from commit de36c75023)
Signed-off-by: phosit <phosit@autistici.org>
This commit is contained in:
Vladislav Belov
2025-11-10 00:06:41 +01:00
committed by phosit
parent 68a7d8a03a
commit d4736962ab
@@ -808,6 +808,11 @@ bool CDevice::AcquireNextBackbuffer()
{
vkDeviceWaitIdle(m_Device);
// Since we know there is no GPU work in progress we can free resources
// queued for deletion.
ProcessDeviceObjectToDestroyQueue(true);
ProcessObjectToDestroyQueue(true);
RecreateSwapChain();
if (!IsSwapChainValid())
return false;