mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 17:40:39 +00:00
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:
@@ -235,6 +235,8 @@ void main()
|
||||
|
||||
vkDestroyImage(device, preinitImg, NULL);
|
||||
vkFreeMemory(device, preinitMem, NULL);
|
||||
|
||||
undefImg.free();
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user