vulkan: fix all memory leaks

Now now errors regarding resource management appear in the debug output / validation layers.
This commit is contained in:
niki
2022-07-11 13:58:35 +02:00
parent c5327bfc4f
commit 9d04ec0030
7 changed files with 42 additions and 13 deletions
+4 -1
View File
@@ -69,9 +69,12 @@ namespace love {
if (textureImage == VK_NULL_HANDLE)
return;
// FIXME: objects for deletion should probably be put on a queue
// instead of greedy waiting here.
vkDeviceWaitIdle(device);
vkDestroySampler(device, textureSampler, nullptr);
vkDestroyImageView(device, textureImageView, nullptr);
vmaDestroyImage(allocator, textureImage, nullptr);
vmaDestroyImage(allocator, textureImage, textureImageAllocation);
textureImage = VK_NULL_HANDLE;
}