|
CeresEngine 0.2.0
A game development framework
|
#include <CeresEngine/RenderAPI/Vulkan/VKMemoryAllocator.hpp>
Public Member Functions | |
| VKMemoryAllocator (VKDevice &device, VkDeviceSize preferredLargeHeapBlockSize) | |
| ~VKMemoryAllocator () | |
| VKMemoryAllocation | allocate (const VkMemoryRequirements &memoryRequirements, VkMemoryPropertyFlags requiredFlags, VkMemoryPropertyFlags preferredFlags=0) |
| Allocates memory from the allocator. | |
| VKMemoryAllocation | allocate (VkBuffer buffer, VkMemoryPropertyFlags requiredFlags, VkMemoryPropertyFlags preferredFlags=0) |
Allocates and binds memory for the given buffer. | |
| VKMemoryAllocation | allocate (VkImage image, VkMemoryPropertyFlags requiredFlags, VkMemoryPropertyFlags preferredFlags=0) |
| Allocates and binds memory for the given ``. | |
Public Member Functions inherited from CeresEngine::VKDeviceObjectBase | |
| VKDeviceObjectBase (VKDevice &device) noexcept | |
Creates a new VKDeviceObjectBase from the given device. | |
| ~VKDeviceObjectBase () noexcept | |
Destroys the VKDeviceObjectBase. | |
Private Attributes | |
| VmaAllocator | allocator = nullptr |
| The Vulkan memory allocator instance. | |
Friends | |
| class | VKMemoryAllocation |
Additional Inherited Members | |
Static Public Member Functions inherited from CeresEngine::VKObject< ChildTypeName, ParentType > | |
| static RC< ChildTypeName > | cast (const RC< ParentType > &ptr) |
Casts a RC containing a ParentType pointer to a pointer to a pointer to a ChildTypeName. | |
| static ChildTypeName & | cast (ParentType &object) |
Casts a object of type ParentType to a object of type ChildTypeName. | |
| static const ChildTypeName & | cast (const ParentType &object) |
Casts a object of type ParentType to a object of type ChildTypeName. | |
| static ChildTypeName * | cast (ParentType *object) |
Casts a object of type ParentType to a object of type ChildTypeName. | |
| static const ChildTypeName * | cast (const ParentType *object) |
Casts a object of type ParentType to a object of type ChildTypeName. | |
Static Public Member Functions inherited from CeresEngine::VKObjectBase | |
| static void * | operator new (size_t size) noexcept |
| static void | operator delete (void *p, std::size_t sz) noexcept |
Public Attributes inherited from CeresEngine::VKDeviceObjectBase | |
| VKDevice & | deviceVK |
The owning VKDevice instance. | |
Protected Member Functions inherited from CeresEngine::VKDeviceObject< VKMemoryAllocator > | |
| VKDeviceObject (VKDevice &device) noexcept | |
Creates a new VKDeviceObject from the given device. | |
|
explicit |
| CeresEngine::VKMemoryAllocator::~VKMemoryAllocator | ( | ) |
| VKMemoryAllocation CeresEngine::VKMemoryAllocator::allocate | ( | const VkMemoryRequirements & | memoryRequirements, |
| VkMemoryPropertyFlags | requiredFlags, | ||
| VkMemoryPropertyFlags | preferredFlags = 0 |
||
| ) |
Allocates memory from the allocator.
| memoryRequirements | The Vulkan memory requirements structure |
| requiredFlags | The required memory flags |
| preferredFlags | The preferred memory flags |
| VKMemoryAllocation CeresEngine::VKMemoryAllocator::allocate | ( | VkBuffer | buffer, |
| VkMemoryPropertyFlags | requiredFlags, | ||
| VkMemoryPropertyFlags | preferredFlags = 0 |
||
| ) |
Allocates and binds memory for the given buffer.
| buffer | The buffer to allocate memory for |
| requiredFlags | The required memory flags to the allocated memory |
| preferredFlags | The preferred memory flags to the allocated memory |
| VKMemoryAllocation CeresEngine::VKMemoryAllocator::allocate | ( | VkImage | image, |
| VkMemoryPropertyFlags | requiredFlags, | ||
| VkMemoryPropertyFlags | preferredFlags = 0 |
||
| ) |
Allocates and binds memory for the given ``.
| image | The to allocate memory for |
| requiredFlags | The required memory flags to the allocated memory |
| preferredFlags | The preferred memory flags to the allocated memory |
|
friend |
|
private |
The Vulkan memory allocator instance.