#include "libANGLE/renderer/vulkan/Suballocation.h"
#include "libANGLE/Context.h"
#include "libANGLE/renderer/vulkan/vk_mem_alloc_wrapper.h"
#include "libANGLE/renderer/vulkan/vk_renderer.h"
namespace rx
{
namespace vk
{
BufferBlock::BufferBlock()
: … { … }
BufferBlock::BufferBlock(BufferBlock &&other)
: … { … }
BufferBlock &BufferBlock::operator=(BufferBlock &&other)
{ … }
BufferBlock::~BufferBlock()
{ … }
void BufferBlock::destroy(Renderer *renderer)
{ … }
VkResult BufferBlock::init(Context *context,
Buffer &buffer,
uint32_t memoryTypeIndex,
vma::VirtualBlockCreateFlags flags,
DeviceMemory &deviceMemory,
VkMemoryPropertyFlags memoryPropertyFlags,
VkDeviceSize size)
{ … }
void BufferBlock::initWithoutVirtualBlock(Context *context,
Buffer &buffer,
MemoryAllocationType memoryAllocationType,
uint32_t memoryTypeIndex,
DeviceMemory &deviceMemory,
VkMemoryPropertyFlags memoryPropertyFlags,
VkDeviceSize size,
VkDeviceSize allocatedBufferSize)
{ … }
VkResult BufferBlock::map(const VkDevice device)
{ … }
void BufferBlock::unmap(const VkDevice device)
{ … }
VkResult BufferBlock::allocate(VkDeviceSize size,
VkDeviceSize alignment,
VmaVirtualAllocation *allocationOut,
VkDeviceSize *offsetOut)
{ … }
void BufferBlock::free(VmaVirtualAllocation allocation, VkDeviceSize offset)
{ … }
int32_t BufferBlock::getAndIncrementEmptyCounter()
{ … }
void BufferBlock::calculateStats(vma::StatInfo *pStatInfo) const
{ … }
VkResult BufferSuballocation::map(Context *context)
{ … }
bool BufferSuballocationGarbage::destroyIfComplete(Renderer *renderer)
{ … }
bool BufferSuballocationGarbage::hasResourceUseSubmitted(Renderer *renderer) const
{ … }
}
}