mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Deletes Vulkan resources on swapchain recreation
The change tries to minimize a memory peak during a window resizing. Refs #6864
This commit is contained in:
@@ -807,6 +807,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;
|
||||
|
||||
Reference in New Issue
Block a user