UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
VulkanRHI::FVulkanSubresourceAllocator Class Reference

#include <VulkanMemory.h>

Public Member Functions

 FVulkanSubresourceAllocator (EVulkanAllocationType InType, FMemoryManager *InOwner, uint8 InSubResourceAllocatorFlags, FDeviceMemoryAllocation *InDeviceMemoryAllocation, uint32 InMemoryTypeIndex, VkMemoryPropertyFlags InMemoryPropertyFlags, uint32 InAlignment, VkBuffer InBuffer, uint32 InBufferSize, uint32 InBufferId, VkBufferUsageFlags InBufferUsageFlags, int32 InPoolSizeIndex)
 
 FVulkanSubresourceAllocator (EVulkanAllocationType InType, FMemoryManager *InOwner, uint8 InSubResourceAllocatorFlags, FDeviceMemoryAllocation *InDeviceMemoryAllocation, uint32 InMemoryTypeIndex, uint32 BufferId=0xffffffff)
 
 ~FVulkanSubresourceAllocator ()
 
void Destroy (FVulkanDevice *Device)
 
bool TryAllocate2 (FVulkanAllocation &OutAllocation, FVulkanEvictable *Owner, uint32 InSize, uint32 InAlignment, EVulkanAllocationMetaType InMetaType, const char *File, uint32 Line)
 
void Free (FVulkanAllocation &Allocation)
 
uint32 GetAlignment () const
 
voidGetMappedPointer ()
 
void Flush (VkDeviceSize Offset, VkDeviceSize AllocationSize)
 
void Invalidate (VkDeviceSize Offset, VkDeviceSize AllocationSize)
 
uint32 GetMaxSize () const
 
uint32 GetUsedSize () const
 
uint32 GetHandleId () const
 
FDeviceMemoryAllocationGetMemoryAllocation ()
 
EVulkanAllocationType GetType ()
 
TArrayView< uint32GetMemoryUsed ()
 
uint32 GetNumSubAllocations ()
 
uint8 GetSubresourceAllocatorFlags ()
 
uint32 GetId ()
 
bool GetIsDefragging ()
 

Protected Member Functions

void SetIsDefragging (bool bInIsDefragging)
 
void DumpFullHeap ()
 
int32 DefragTick (FVulkanDevice &Device, const FVulkanContextArray &Contexts, FVulkanResourceHeap *Heap, uint32 Count)
 
bool CanDefrag ()
 
uint64 EvictToHost (FVulkanDevice &Device, const FVulkanContextArray &Contexts)
 
void SetFreePending (FVulkanAllocation &Allocation)
 
void FreeInternalData (int32 Index)
 
int32 AllocateInternalData ()
 
bool JoinFreeBlocks ()
 
uint32 GetAllocatorIndex ()
 

Protected Attributes

uint32 MemoryUsed [EVulkanAllocationMetaSize]
 
EVulkanAllocationType Type
 
FMemoryManagerOwner
 
uint32 MemoryTypeIndex
 
VkMemoryPropertyFlags MemoryPropertyFlags
 
FDeviceMemoryAllocationMemoryAllocation
 
uint32 MaxSize
 
uint32 Alignment
 
uint32 FrameFreed
 
uint32 LastDefragFrame = 0
 
int64 UsedSize
 
VkBufferUsageFlags BufferUsageFlags
 
VkBuffer Buffer
 
uint32 BufferId
 
int32 PoolSizeIndex
 
uint32 AllocatorIndex
 
uint8 SubresourceAllocatorFlags
 
uint8 BucketId
 
bool bIsEvicting = false
 
bool bLocked = false
 
bool bIsDefragging = false
 
uint32 NumSubAllocations = 0
 
uint32 AllocCalls = 0
 
uint32 FreeCalls = 0
 
TArray< FRangeFreeList
 
FVulkanTrackInfo Track
 
TArray< FVulkanAllocationInternalInternalData
 
int32 InternalFreeList = -1
 
FCriticalSection SubresourceAllocatorCS
 

Friends

class FMemoryManager
 
class FVulkanResourceHeap
 

Constructor & Destructor Documentation

◆ FVulkanSubresourceAllocator() [1/2]

VulkanRHI::FVulkanSubresourceAllocator::FVulkanSubresourceAllocator ( EVulkanAllocationType  InType,
FMemoryManager InOwner,
uint8  InSubResourceAllocatorFlags,
FDeviceMemoryAllocation InDeviceMemoryAllocation,
uint32  InMemoryTypeIndex,
VkMemoryPropertyFlags  InMemoryPropertyFlags,
uint32  InAlignment,
VkBuffer  InBuffer,
uint32  InBufferSize,
uint32  InBufferId,
VkBufferUsageFlags  InBufferUsageFlags,
int32  InPoolSizeIndex 
)

◆ FVulkanSubresourceAllocator() [2/2]

VulkanRHI::FVulkanSubresourceAllocator::FVulkanSubresourceAllocator ( EVulkanAllocationType  InType,
FMemoryManager InOwner,
uint8  InSubResourceAllocatorFlags,
FDeviceMemoryAllocation InDeviceMemoryAllocation,
uint32  InMemoryTypeIndex,
uint32  BufferId = 0xffffffff 
)

◆ ~FVulkanSubresourceAllocator()

VulkanRHI::FVulkanSubresourceAllocator::~FVulkanSubresourceAllocator ( )

Member Function Documentation

◆ AllocateInternalData()

int32 VulkanRHI::FVulkanSubresourceAllocator::AllocateInternalData ( )
protected

◆ CanDefrag()

bool VulkanRHI::FVulkanSubresourceAllocator::CanDefrag ( )
protected

◆ DefragTick()

int32 VulkanRHI::FVulkanSubresourceAllocator::DefragTick ( FVulkanDevice Device,
const FVulkanContextArray Contexts,
FVulkanResourceHeap Heap,
uint32  Count 
)
protected

◆ Destroy()

void VulkanRHI::FVulkanSubresourceAllocator::Destroy ( FVulkanDevice Device)

◆ DumpFullHeap()

void VulkanRHI::FVulkanSubresourceAllocator::DumpFullHeap ( )
protected

◆ EvictToHost()

uint64 VulkanRHI::FVulkanSubresourceAllocator::EvictToHost ( FVulkanDevice Device,
const FVulkanContextArray Contexts 
)
protected

◆ Flush()

void VulkanRHI::FVulkanSubresourceAllocator::Flush ( VkDeviceSize  Offset,
VkDeviceSize  AllocationSize 
)

◆ Free()

void VulkanRHI::FVulkanSubresourceAllocator::Free ( FVulkanAllocation Allocation)

◆ FreeInternalData()

void VulkanRHI::FVulkanSubresourceAllocator::FreeInternalData ( int32  Index)
protected

◆ GetAlignment()

uint32 VulkanRHI::FVulkanSubresourceAllocator::GetAlignment ( ) const
inline

◆ GetAllocatorIndex()

uint32 VulkanRHI::FVulkanSubresourceAllocator::GetAllocatorIndex ( )
inlineprotected

◆ GetHandleId()

uint32 VulkanRHI::FVulkanSubresourceAllocator::GetHandleId ( ) const
inline

◆ GetId()

uint32 VulkanRHI::FVulkanSubresourceAllocator::GetId ( )
inline

◆ GetIsDefragging()

bool VulkanRHI::FVulkanSubresourceAllocator::GetIsDefragging ( )
inline

◆ GetMappedPointer()

void * VulkanRHI::FVulkanSubresourceAllocator::GetMappedPointer ( )
inline

◆ GetMaxSize()

uint32 VulkanRHI::FVulkanSubresourceAllocator::GetMaxSize ( ) const
inline

◆ GetMemoryAllocation()

FDeviceMemoryAllocation * VulkanRHI::FVulkanSubresourceAllocator::GetMemoryAllocation ( )
inline

◆ GetMemoryUsed()

TArrayView< uint32 > VulkanRHI::FVulkanSubresourceAllocator::GetMemoryUsed ( )

◆ GetNumSubAllocations()

uint32 VulkanRHI::FVulkanSubresourceAllocator::GetNumSubAllocations ( )

◆ GetSubresourceAllocatorFlags()

uint8 VulkanRHI::FVulkanSubresourceAllocator::GetSubresourceAllocatorFlags ( )
inline

◆ GetType()

EVulkanAllocationType VulkanRHI::FVulkanSubresourceAllocator::GetType ( )
inline

◆ GetUsedSize()

uint32 VulkanRHI::FVulkanSubresourceAllocator::GetUsedSize ( ) const
inline

◆ Invalidate()

void VulkanRHI::FVulkanSubresourceAllocator::Invalidate ( VkDeviceSize  Offset,
VkDeviceSize  AllocationSize 
)

◆ JoinFreeBlocks()

bool VulkanRHI::FVulkanSubresourceAllocator::JoinFreeBlocks ( )
protected

◆ SetFreePending()

void VulkanRHI::FVulkanSubresourceAllocator::SetFreePending ( FVulkanAllocation Allocation)
protected

◆ SetIsDefragging()

void VulkanRHI::FVulkanSubresourceAllocator::SetIsDefragging ( bool  bInIsDefragging)
inlineprotected

◆ TryAllocate2()

bool VulkanRHI::FVulkanSubresourceAllocator::TryAllocate2 ( FVulkanAllocation OutAllocation,
FVulkanEvictable Owner,
uint32  InSize,
uint32  InAlignment,
EVulkanAllocationMetaType  InMetaType,
const char File,
uint32  Line 
)

Friends And Related Symbol Documentation

◆ FMemoryManager

friend class FMemoryManager
friend

◆ FVulkanResourceHeap

Member Data Documentation

◆ Alignment

uint32 VulkanRHI::FVulkanSubresourceAllocator::Alignment
protected

◆ AllocatorIndex

uint32 VulkanRHI::FVulkanSubresourceAllocator::AllocatorIndex
protected

◆ AllocCalls

uint32 VulkanRHI::FVulkanSubresourceAllocator::AllocCalls = 0
protected

◆ bIsDefragging

bool VulkanRHI::FVulkanSubresourceAllocator::bIsDefragging = false
protected

◆ bIsEvicting

bool VulkanRHI::FVulkanSubresourceAllocator::bIsEvicting = false
protected

◆ bLocked

bool VulkanRHI::FVulkanSubresourceAllocator::bLocked = false
protected

◆ BucketId

uint8 VulkanRHI::FVulkanSubresourceAllocator::BucketId
protected

◆ Buffer

VkBuffer VulkanRHI::FVulkanSubresourceAllocator::Buffer
protected

◆ BufferId

uint32 VulkanRHI::FVulkanSubresourceAllocator::BufferId
protected

◆ BufferUsageFlags

VkBufferUsageFlags VulkanRHI::FVulkanSubresourceAllocator::BufferUsageFlags
protected

◆ FrameFreed

uint32 VulkanRHI::FVulkanSubresourceAllocator::FrameFreed
protected

◆ FreeCalls

uint32 VulkanRHI::FVulkanSubresourceAllocator::FreeCalls = 0
protected

◆ FreeList

TArray<FRange> VulkanRHI::FVulkanSubresourceAllocator::FreeList
protected

◆ InternalData

TArray<FVulkanAllocationInternal> VulkanRHI::FVulkanSubresourceAllocator::InternalData
protected

◆ InternalFreeList

int32 VulkanRHI::FVulkanSubresourceAllocator::InternalFreeList = -1
protected

◆ LastDefragFrame

uint32 VulkanRHI::FVulkanSubresourceAllocator::LastDefragFrame = 0
protected

◆ MaxSize

uint32 VulkanRHI::FVulkanSubresourceAllocator::MaxSize
protected

◆ MemoryAllocation

FDeviceMemoryAllocation* VulkanRHI::FVulkanSubresourceAllocator::MemoryAllocation
protected

◆ MemoryPropertyFlags

VkMemoryPropertyFlags VulkanRHI::FVulkanSubresourceAllocator::MemoryPropertyFlags
protected

◆ MemoryTypeIndex

uint32 VulkanRHI::FVulkanSubresourceAllocator::MemoryTypeIndex
protected

◆ MemoryUsed

uint32 VulkanRHI::FVulkanSubresourceAllocator::MemoryUsed[EVulkanAllocationMetaSize]
protected

◆ NumSubAllocations

uint32 VulkanRHI::FVulkanSubresourceAllocator::NumSubAllocations = 0
protected

◆ Owner

FMemoryManager* VulkanRHI::FVulkanSubresourceAllocator::Owner
protected

◆ PoolSizeIndex

int32 VulkanRHI::FVulkanSubresourceAllocator::PoolSizeIndex
protected

◆ SubresourceAllocatorCS

FCriticalSection VulkanRHI::FVulkanSubresourceAllocator::SubresourceAllocatorCS
protected

◆ SubresourceAllocatorFlags

uint8 VulkanRHI::FVulkanSubresourceAllocator::SubresourceAllocatorFlags
protected

◆ Track

FVulkanTrackInfo VulkanRHI::FVulkanSubresourceAllocator::Track
protected

◆ Type

EVulkanAllocationType VulkanRHI::FVulkanSubresourceAllocator::Type
protected

◆ UsedSize

int64 VulkanRHI::FVulkanSubresourceAllocator::UsedSize
protected

The documentation for this class was generated from the following files: