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
1 changed files with 5 additions and 0 deletions
|
@ -12257,10 +12257,15 @@ void VmaAllocator_T::FreeDedicatedMemory(VmaAllocation allocation)
|
||||||
|
|
||||||
VkDeviceMemory hMemory = allocation->GetMemory();
|
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)
|
if(allocation->GetMappedData() != VMA_NULL)
|
||||||
{
|
{
|
||||||
(*m_VulkanFunctions.vkUnmapMemory)(m_hDevice, hMemory);
|
(*m_VulkanFunctions.vkUnmapMemory)(m_hDevice, hMemory);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
FreeVulkanMemory(memTypeIndex, allocation->GetSize(), hMemory);
|
FreeVulkanMemory(memTypeIndex, allocation->GetSize(), hMemory);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue