 |
VulkanMemoryAllocator Class |
Inheritance Hierarchy Namespace: Ab4d.SharpEngine.UtilitiesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntaxpublic class VulkanMemoryAllocator : GpuDeviceComponent,
IVulkanMemoryAllocator
The VulkanMemoryAllocator type exposes the following members.
Properties
Methods | Name | Description |
---|
 | AllocateMemory(Buffer, MemoryPropertyFlags, Boolean, String) | |
 | AllocateMemory(Image, MemoryPropertyFlags, Boolean, String) | |
 | AllocateMemory(MemoryRequirements, MemoryPropertyFlags, Boolean, Boolean, String) | |
 | AllocateMemory(UInt32, UInt32, Int32, Boolean, Boolean, String) | |
 | AllocateMemory(UInt32, UInt32, Int32, Boolean, Boolean, UInt32, String) | |
 | AllocateVulkanMemory |
AllocateVulkanMemory is a protected virtual method that calls the vkAllocateMemory function.
The method can be overwritten to provide custom allocation logic.
|
 | Cleanup |
Cleanup method checks all memory blocks.
Memory block is freed when it is empty and freeEmptyMemoryBlocks is true or when it empty for at least EngineRuntimeOptions.FramesCountToReleaseEmptyMemoryBlock frames.
|
  | Create | |
 | Dispose | (Overrides ComponentBaseDispose(Boolean)) |
 | DumpMemoryAllocations |
Writes string that that describes the allocated memory to the console (when the application is debugged in Visual Studio the string is written to Output window).
|
 | FreeMemory(VulkanMemoryInfo) | |
 | FreeMemory(Int32, UInt32, String) | |
 | FreeVulkanMemory |
FreeVulkanMemory is a protected virtual method that calls the vkFreeMemory function.
The method can be overwritten to provide custom allocation logic.
|
 | GetNewMemoryBlockSize |
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.
|
 | GetReportString |
Gets the string that describes the allocated memory.
|
Top
See Also