diff --git a/util/test/demos/vk/vk_image_layouts.cpp b/util/test/demos/vk/vk_image_layouts.cpp index 64d11fd41..913ac74ac 100644 --- a/util/test/demos/vk/vk_image_layouts.cpp +++ b/util/test/demos/vk/vk_image_layouts.cpp @@ -235,6 +235,8 @@ void main() vkDestroyImage(device, preinitImg, NULL); vkFreeMemory(device, preinitMem, NULL); + + undefImg.free(); } return 0; diff --git a/util/test/demos/vk/vk_test.cpp b/util/test/demos/vk/vk_test.cpp index 1ff3e17c3..01b2151d9 100644 --- a/util/test/demos/vk/vk_test.cpp +++ b/util/test/demos/vk/vk_test.cpp @@ -1171,7 +1171,7 @@ AllocatedImage::AllocatedImage(VulkanGraphicsTest *test, const VkImageCreateInfo void AllocatedImage::free() { - vmaFreeMemory(allocator, alloc); + vmaDestroyImage(allocator, image, alloc); test->imageAllocs.erase(image); } @@ -1187,6 +1187,6 @@ AllocatedBuffer::AllocatedBuffer(VulkanGraphicsTest *test, const VkBufferCreateI void AllocatedBuffer::free() { - vmaFreeMemory(allocator, alloc); + vmaDestroyBuffer(allocator, buffer, alloc); test->bufferAllocs.erase(buffer); }