MCPcopy Create free account
hub / github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator / FreeVulkanMemory

Method FreeVulkanMemory

include/vk_mem_alloc.h:15082–15098  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15080}
15081
15082void 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
15100VkResult VmaAllocator_T::BindVulkanBuffer(
15101 VkDeviceMemory memory,

Callers 1

DestroyMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected