Free undefined image in VK_Image_layouts test

* The free() function should also destroy the image/buffer not just free the
  memory.
This commit is contained in:
baldurk
2019-11-26 23:34:33 +00:00
parent 94ccfd5497
commit 31c962bf51
2 changed files with 4 additions and 2 deletions
+2
View File
@@ -235,6 +235,8 @@ void main()
vkDestroyImage(device, preinitImg, NULL);
vkFreeMemory(device, preinitMem, NULL);
undefImg.free();
}
return 0;
+2 -2
View File
@@ -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);
}