5#include <unordered_map>
9#include "VulkanMemoryAllocator/include/vk_mem_alloc.h"
43 VkMemoryAllocateInfo* pAllocationInfo,
44 VkMemoryRequirements* pMemoryRequirements,
45 uint64_t* pPageCount);
55 static VkResult
bindBuffer(VkBuffer pBuffer, uint64_t iAllocationId);
65 static VkResult
bindImage(VkImage pImage, uint64_t iAllocationId);
78 memoryMap(uint64_t iAllocationId, uint64_t iPageNumber, VkDeviceSize* pMapLength,
void** pData);
86 static void memoryUnmap(uint64_t iAllocationId, uint64_t iPageNumber);
93 static void freeMem(uint64_t iAllocationId);
102 std::unordered_map<uint64_t, std::pair<VmaAllocation, VkDeviceSize>>
allocations;
123 static std::pair<std::recursive_mutex, Data>
mtxData;
Definition: KtxLoadingCallbackManager.h:17
static VkResult bindBuffer(VkBuffer pBuffer, uint64_t iAllocationId)
Definition: KtxLoadingCallbackManager.cpp:136
static void freeMem(uint64_t iAllocationId)
Definition: KtxLoadingCallbackManager.cpp:220
static void memoryUnmap(uint64_t iAllocationId, uint64_t iPageNumber)
Definition: KtxLoadingCallbackManager.cpp:206
static size_t getCurrentAllocationCount()
Definition: KtxLoadingCallbackManager.cpp:18
static std::pair< std::recursive_mutex, Data > mtxData
Definition: KtxLoadingCallbackManager.h:123
static VkPhysicalDevice getPhysicalDevice()
Definition: KtxLoadingCallbackManager.cpp:244
static VmaAllocator getMemoryAllocator()
Definition: KtxLoadingCallbackManager.cpp:238
static VkResult bindImage(VkImage pImage, uint64_t iAllocationId)
Definition: KtxLoadingCallbackManager.cpp:158
static ktxVulkanTexture_subAllocatorCallbacks getKtxSubAllocatorCallbacks()
Definition: KtxLoadingCallbackManager.cpp:23
static VkResult memoryMap(uint64_t iAllocationId, uint64_t iPageNumber, VkDeviceSize *pMapLength, void **pData)
Definition: KtxLoadingCallbackManager.cpp:180
static uint64_t allocMem(VkMemoryAllocateInfo *pAllocationInfo, VkMemoryRequirements *pMemoryRequirements, uint64_t *pPageCount)
Definition: KtxLoadingCallbackManager.cpp:35
Definition: KtxLoadingCallbackManager.h:97
uint64_t iAllocationId
Definition: KtxLoadingCallbackManager.h:105
std::unordered_map< uint64_t, std::pair< VmaAllocation, VkDeviceSize > > allocations
Definition: KtxLoadingCallbackManager.h:102