Click or drag to resize
Ab4d.SharpEngine logo

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.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 3.2.9386+3a404a3e1ebfa4efd231da7fe6f10dfb23b95dc4
Syntax
C#
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

UInt32
size of allocated memory block
Remarks

[Missing <remarks> documentation for "M:Ab4d.SharpEngine.Utilities.VulkanMemoryAllocator.GetNewMemoryBlockSize(System.UInt32,System.UInt32,System.Int32,System.Int32,System.Boolean)"]

See Also