3#include <vulkan/vulkan.h>
32 const VkMemoryAllocateInfo * pAllocateInfo,
33 const VkAllocationCallbacks * pAllocator,
34 VkDeviceMemory * pMemory
39 VkDeviceMemory memory,
40 const VkAllocationCallbacks * pAllocator
52 std::map<VkDeviceMemory, VkDeviceSize> m_allocated_memory;
54 VkDeviceSize m_allocated_memory_size = 0;
56 mutable TracyLockableN(std::mutex, m_mutex,
"Vulkan Memory Allocator");
Singleton class to keep track of allocated memory.
Definition: VulkanMemoryAllocator.hpp:15
static VulkanMemoryAllocator & getInstance()
Definition: VulkanMemoryAllocator.hpp:19
VulkanMemoryAllocator & operator=(const VulkanMemoryAllocator &)=delete
VulkanMemoryAllocator & operator=(VulkanMemoryAllocator &&)=delete
uint32_t allocatedMemoryCount() const
Definition: VulkanMemoryAllocator.cpp:56
VkDeviceSize allocatedMemorySize() const
Definition: VulkanMemoryAllocator.cpp:50
void freeMemory(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks *pAllocator)
Definition: VulkanMemoryAllocator.cpp:33
VkResult allocateMemory(VkDevice device, const VkMemoryAllocateInfo *pAllocateInfo, const VkAllocationCallbacks *pAllocator, VkDeviceMemory *pMemory)
Definition: VulkanMemoryAllocator.cpp:13
VulkanMemoryAllocator(const VulkanMemoryAllocator &)=delete
VulkanMemoryAllocator(VulkanMemoryAllocator &&)=delete