| 15080 | } |
| 15081 | |
| 15082 | void VmaAllocator_T::FreeVulkanMemory(uint32_t memoryType, VkDeviceSize size, VkDeviceMemory hMemory) |
| 15083 | { |
| 15084 | // Informative callback. |
| 15085 | if(m_DeviceMemoryCallbacks.pfnFree != VMA_NULL) |
| 15086 | { |
| 15087 | (*m_DeviceMemoryCallbacks.pfnFree)(this, memoryType, hMemory, size, m_DeviceMemoryCallbacks.pUserData); |
| 15088 | } |
| 15089 | |
| 15090 | // VULKAN CALL vkFreeMemory. |
| 15091 | (*m_VulkanFunctions.vkFreeMemory)(m_hDevice, hMemory, GetAllocationCallbacks()); |
| 15092 | |
| 15093 | const uint32_t heapIndex = MemoryTypeIndexToHeapIndex(memoryType); |
| 15094 | --m_Budget.m_BlockCount[heapIndex]; |
| 15095 | m_Budget.m_BlockBytes[heapIndex] -= size; |
| 15096 | |
| 15097 | --m_DeviceMemoryCount; |
| 15098 | } |
| 15099 | |
| 15100 | VkResult VmaAllocator_T::BindVulkanBuffer( |
| 15101 | VkDeviceMemory memory, |