Minor optimization: Skip call to vkUnmapMemory before vkFreeMemory for dedicated allocations, which is allowed by the spec.
diff --git a/src/vk_mem_alloc.h b/src/vk_mem_alloc.h
index 179e9df..e284dad 100644
--- a/src/vk_mem_alloc.h
+++ b/src/vk_mem_alloc.h
@@ -12257,10 +12257,15 @@
 

     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);