Commit 1e322233 by Hernan Liatis

Fix mismatched alloc/free in Swapchain

The swapchain images were being freed with an allocator despite never being created with one. Tests: dEQP-VK.wsi.xlib.swapchain.simulate_oom.* Bug: b/132451407 Change-Id: I26c6ecd18d04f514cdae171100de6a89c919a777 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/31692 Presubmit-Ready: Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com> Tested-by: 's avatarHernan Liatis <hliatis@google.com>
parent 94e3e4ac
......@@ -38,8 +38,8 @@ void SwapchainKHR::destroy(const VkAllocationCallbacks *pAllocator)
if (currentImage.imageStatus != NONEXISTENT)
{
vk::Cast(createInfo.surface)->detachImage(&currentImage);
vk::destroy(currentImage.imageMemory, pAllocator);
vk::destroy(currentImage.image, pAllocator);
vk::destroy(currentImage.imageMemory, nullptr);
vk::destroy(currentImage.image, nullptr);
currentImage.imageStatus = NONEXISTENT;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment