14VK_DEFINE_HANDLE(VmaAllocation)
15VK_DEFINE_HANDLE(VmaAllocator)
19 class VKMemoryAllocator;
Definition VKDevice.hpp:79
Definition VKCommon.hpp:143
Definition VKMemoryAllocator.hpp:21
void flush(VkDeviceSize offset=0, VkDeviceSize size=VK_WHOLE_SIZE)
Flushes the cached memory data starting at offset with size bytes.
VkDeviceSize getSize() const
VKMemoryAllocation & operator=(const VKMemoryAllocation &)=delete
void invalidate(VkDeviceSize offset=0, VkDeviceSize size=VK_WHOLE_SIZE)
Invalidates the cached memory data starting at offset with size bytes.
VKMemoryAllocator * allocator
The memory allocator.
Definition VKMemoryAllocator.hpp:24
VkDeviceSize getOffset() const
VmaAllocation allocation
The Vulkan memory allocation.
Definition VKMemoryAllocator.hpp:27
VKMemoryAllocation(const VKMemoryAllocation &)=delete
void bind(VkImage image)
Binds the allocated memory to the given ``.
VKMemoryAllocation(VKMemoryAllocation &&) noexcept
UInt32 getMemoryType() const
void unmap()
Unmaps the memory.
VKMemoryAllocation(VKMemoryAllocator &allocator, const VkMemoryRequirements &memoryRequirements, VkMemoryPropertyFlags requiredFlags, VkMemoryPropertyFlags preferredFlags=0)
void * map()
Maps the memory.
void bind(VkBuffer buffer)
Binds the allocated memory to the given buffer.
VkDeviceMemory getDeviceMemory() const
Definition VKMemoryAllocator.hpp:87
VKMemoryAllocation allocate(VkBuffer buffer, VkMemoryPropertyFlags requiredFlags, VkMemoryPropertyFlags preferredFlags=0)
Allocates and binds memory for the given buffer.
VKMemoryAllocator(VKDevice &device, VkDeviceSize preferredLargeHeapBlockSize)
VKMemoryAllocation allocate(VkImage image, VkMemoryPropertyFlags requiredFlags, VkMemoryPropertyFlags preferredFlags=0)
Allocates and binds memory for the given ``.
VKMemoryAllocation allocate(const VkMemoryRequirements &memoryRequirements, VkMemoryPropertyFlags requiredFlags, VkMemoryPropertyFlags preferredFlags=0)
Allocates memory from the allocator.
VmaAllocator allocator
The Vulkan memory allocator instance.
Definition VKMemoryAllocator.hpp:92
Definition Application.hpp:19
std::uint32_t UInt32
Definition DataTypes.hpp:23
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25