|
VulkanMemoryAllocatorGetNewMemoryBlockSize Method |
GetNewMemoryBlockSize is a protected virtual method that returns the size of the allocated memory block
based on the memoryTypeIndex, requestedSize (size of a single allocation that lead to the allocation of new memory block) and
allocatedMemoryBlocksForThisMemoryType (number of already allocated memory blocks for this memoryTypeIndex).
The method can be overwritten to provide custom size calculation logic.
Namespace: Ab4d.SharpEngine.UtilitiesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax protected virtual uint GetNewMemoryBlockSize(
uint memoryTypeIndex,
uint requestedSize,
int alignment,
int allocatedMemoryBlocksForThisMemoryType,
bool isImage
)
Parameters
- memoryTypeIndex UInt32
- memoryTypeIndex from MemoryAllocateInfo
- requestedSize UInt32
- size of a single allocation that lead to the allocation of new memory block
- alignment Int32
- required memory alignment
- allocatedMemoryBlocksForThisMemoryType Int32
- number of already allocated memory blocks for this memoryTypeIndex
- isImage Boolean
- when true the memory is going to be used for images; when false the memory is going to be used for buffers
Return Value
UInt32size of allocated memory block
See Also