Nameless Engine
Loading...
Searching...
No Matches
ne::KtxLoadingCallbackManager Class Reference

#include <KtxLoadingCallbackManager.h>

Classes

struct  Data
 

Static Public Member Functions

static size_t getCurrentAllocationCount ()
 
static ktxVulkanTexture_subAllocatorCallbacks getKtxSubAllocatorCallbacks ()
 
static uint64_t allocMem (VkMemoryAllocateInfo *pAllocationInfo, VkMemoryRequirements *pMemoryRequirements, uint64_t *pPageCount)
 
static VkResult bindBuffer (VkBuffer pBuffer, uint64_t iAllocationId)
 
static VkResult bindImage (VkImage pImage, uint64_t iAllocationId)
 
static VkResult memoryMap (uint64_t iAllocationId, uint64_t iPageNumber, VkDeviceSize *pMapLength, void **pData)
 
static void memoryUnmap (uint64_t iAllocationId, uint64_t iPageNumber)
 
static void freeMem (uint64_t iAllocationId)
 

Static Private Member Functions

static VmaAllocator getMemoryAllocator ()
 
static VkPhysicalDevice getPhysicalDevice ()
 

Static Private Attributes

static std::pair< std::recursive_mutex, DatamtxData {}
 

Detailed Description

Provides static memory-related callbacks for KTX-Software (external dependency) because it does not support our memory allocator out of the box.

Member Function Documentation

◆ allocMem()

uint64_t ne::KtxLoadingCallbackManager::allocMem ( VkMemoryAllocateInfo *  pAllocationInfo,
VkMemoryRequirements *  pMemoryRequirements,
uint64_t *  pPageCount 
)
static

KTX loader (external dependency) callback.

Parameters
pAllocationInfo
pMemoryRequirements
pPageCount
Returns
Allocation ID.

◆ bindBuffer()

VkResult ne::KtxLoadingCallbackManager::bindBuffer ( VkBuffer  pBuffer,
uint64_t  iAllocationId 
)
static

KTX loader (external dependency) callback.

Parameters
pBuffer
iAllocationId
Returns
Result of the operation.

◆ bindImage()

VkResult ne::KtxLoadingCallbackManager::bindImage ( VkImage  pImage,
uint64_t  iAllocationId 
)
static

KTX loader (external dependency) callback.

Parameters
pImage
iAllocationId
Returns
Result of the operation.

◆ freeMem()

void ne::KtxLoadingCallbackManager::freeMem ( uint64_t  iAllocationId)
static

KTX loader (external dependency) callback.

Parameters
iAllocationId

◆ getCurrentAllocationCount()

size_t ne::KtxLoadingCallbackManager::getCurrentAllocationCount ( )
static

Returns the current amount of active (not freed) allocations.

Returns
The number of current allocations.

◆ getKtxSubAllocatorCallbacks()

ktxVulkanTexture_subAllocatorCallbacks ne::KtxLoadingCallbackManager::getKtxSubAllocatorCallbacks ( )
static

Returns callbacks used with KTX images for KTX-Software (external dependency).

Returns
Callbacks.

◆ getMemoryAllocator()

VmaAllocator ne::KtxLoadingCallbackManager::getMemoryAllocator ( )
staticprivate

Returns memory allocator of resource manager.

Returns
Memory allocator.

◆ getPhysicalDevice()

VkPhysicalDevice ne::KtxLoadingCallbackManager::getPhysicalDevice ( )
staticprivate

Returns renderer's physical device.

Returns
Physical device.

◆ memoryMap()

VkResult ne::KtxLoadingCallbackManager::memoryMap ( uint64_t  iAllocationId,
uint64_t  iPageNumber,
VkDeviceSize *  pMapLength,
void **  pData 
)
static

KTX loader (external dependency) callback.

Parameters
iAllocationId
iPageNumber
pMapLength
pData
Returns
Result of the operation.

◆ memoryUnmap()

void ne::KtxLoadingCallbackManager::memoryUnmap ( uint64_t  iAllocationId,
uint64_t  iPageNumber 
)
static

KTX loader (external dependency) callback.

Parameters
iAllocationId
iPageNumber

Member Data Documentation

◆ mtxData

std::pair< std::recursive_mutex, KtxLoadingCallbackManager::Data > ne::KtxLoadingCallbackManager::mtxData {}
staticprivate

Internal data.


The documentation for this class was generated from the following files: