mirror of
https://github.com/love2d/love.git
synced 2026-08-18 03:34:23 +02:00
vulkan: fix clean up
We now don't do any more greedy waiting when destroying vulkan objects.
This commit is contained in:
@@ -46,13 +46,10 @@ namespace love {
|
||||
if (buffer == VK_NULL_HANDLE)
|
||||
return;
|
||||
|
||||
Graphics* vgfx = (Graphics*)gfx;
|
||||
auto device = vgfx->getDevice();
|
||||
|
||||
// FIXME: objects for deletion should probably be put on a queue
|
||||
// instead of greedy waiting here.
|
||||
vkDeviceWaitIdle(device);
|
||||
vmaDestroyBuffer(allocator, buffer, allocation);
|
||||
auto vgfx = (Graphics*)gfx;
|
||||
vgfx->queueCleanUp([allocator=allocator, buffer=buffer, allocation=allocation](){
|
||||
vmaDestroyBuffer(allocator, buffer, allocation);
|
||||
});
|
||||
buffer = VK_NULL_HANDLE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user