mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
synced 2024-11-22 15:04:34 +00:00
Fixed bug in case vkBindImageMemory/vkBindBufferMemory fails.
This commit is contained in:
parent
5bc033f19d
commit
495cb16fa3
@ -8246,6 +8246,8 @@ VkResult vmaCreateBuffer(
|
|||||||
}
|
}
|
||||||
allocator->FreeMemory(*pAllocation);
|
allocator->FreeMemory(*pAllocation);
|
||||||
*pAllocation = VK_NULL_HANDLE;
|
*pAllocation = VK_NULL_HANDLE;
|
||||||
|
(*allocator->GetVulkanFunctions().vkDestroyBuffer)(allocator->m_hDevice, *pBuffer, allocator->GetAllocationCallbacks());
|
||||||
|
*pBuffer = VK_NULL_HANDLE;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
(*allocator->GetVulkanFunctions().vkDestroyBuffer)(allocator->m_hDevice, *pBuffer, allocator->GetAllocationCallbacks());
|
(*allocator->GetVulkanFunctions().vkDestroyBuffer)(allocator->m_hDevice, *pBuffer, allocator->GetAllocationCallbacks());
|
||||||
@ -8324,6 +8326,8 @@ VkResult vmaCreateImage(
|
|||||||
}
|
}
|
||||||
allocator->FreeMemory(*pAllocation);
|
allocator->FreeMemory(*pAllocation);
|
||||||
*pAllocation = VK_NULL_HANDLE;
|
*pAllocation = VK_NULL_HANDLE;
|
||||||
|
(*allocator->GetVulkanFunctions().vkDestroyImage)(allocator->m_hDevice, *pImage, allocator->GetAllocationCallbacks());
|
||||||
|
*pImage = VK_NULL_HANDLE;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
(*allocator->GetVulkanFunctions().vkDestroyImage)(allocator->m_hDevice, *pImage, allocator->GetAllocationCallbacks());
|
(*allocator->GetVulkanFunctions().vkDestroyImage)(allocator->m_hDevice, *pImage, allocator->GetAllocationCallbacks());
|
||||||
|
Loading…
Reference in New Issue
Block a user