mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
synced 2024-11-10 10:41:52 +00:00
Minor optimization: Skip call to vkUnmapMemory before vkFreeMemory for dedicated allocations, which is allowed by the spec.
This commit is contained in:
parent
1e425dda03
commit
14d9e1a938
@ -12257,10 +12257,15 @@ void VmaAllocator_T::FreeDedicatedMemory(VmaAllocation allocation)
|
||||
|
||||
VkDeviceMemory hMemory = allocation->GetMemory();
|
||||
|
||||
/*
|
||||
There is no need to call this, because Vulkan spec allows to skip vkUnmapMemory
|
||||
before vkFreeMemory.
|
||||
|
||||
if(allocation->GetMappedData() != VMA_NULL)
|
||||
{
|
||||
(*m_VulkanFunctions.vkUnmapMemory)(m_hDevice, hMemory);
|
||||
}
|
||||
*/
|
||||
|
||||
FreeVulkanMemory(memTypeIndex, allocation->GetSize(), hMemory);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user