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

#include <RHICoreTransientResourceAllocator.h>

+ Inheritance diagram for FRHITransientResourceHeapAllocator:

Public Member Functions

RHICORE_API FRHITransientResourceHeapAllocator (FRHITransientHeapCache &InHeapCache)
 
RHICORE_API ~FRHITransientResourceHeapAllocator ()
 
RHICORE_API void SetCreateMode (ERHITransientResourceCreateMode InCreateMode) override
 
RHICORE_API void DeallocateMemory (FRHITransientTexture *Texture, const FRHITransientAllocationFences &Fences) override
 
RHICORE_API void DeallocateMemory (FRHITransientBuffer *Buffer, const FRHITransientAllocationFences &Fences) override
 
RHICORE_API void Flush (FRHICommandListImmediate &RHICmdList, FRHITransientAllocationStats *OutAllocationStats) override
 
TConstArrayView< FRHITransientHeap * > GetHeaps () const
 
template<typename TransientResourceType , typename LambdaType , typename ResourceCreateInfo >
TransientResourceTypeCreateTransientResource (LambdaType &&Lambda, uint64 Hash, uint64 Size, const ResourceCreateInfo &CreateInfo)
 
- Public Member Functions inherited from IRHITransientResourceAllocator
virtual ~IRHITransientResourceAllocator ()=default
 
virtual bool SupportsResourceType (ERHITransientResourceType Type) const =0
 
virtual FRHITransientTextureCreateTexture (const FRHITextureCreateInfo &CreateInfo, const TCHAR *DebugName, const FRHITransientAllocationFences &Fences)=0
 
virtual FRHITransientBufferCreateBuffer (const FRHIBufferCreateInfo &CreateInfo, const TCHAR *DebugName, const FRHITransientAllocationFences &Fences)=0
 
virtual void Release (FRHICommandListImmediate &RHICmdList)
 

Public Attributes

FRHITransientHeapCacheHeapCache
 

Protected Member Functions

RHICORE_API FRHITransientTextureCreateTextureInternal (const FRHITextureCreateInfo &CreateInfo, const TCHAR *DebugName, const FRHITransientAllocationFences &Fences, uint64 TextureSize, uint32 TextureAlignment, FRHITransientHeap::FCreateTextureFunction CreateTextureFunction)
 
RHICORE_API FRHITransientBufferCreateBufferInternal (const FRHIBufferCreateInfo &CreateInfo, const TCHAR *DebugName, const FRHITransientAllocationFences &Fences, uint32 BufferSize, uint32 BufferAlignment, FRHITransientHeap::FCreateBufferFunction CreateBufferFunction)
 

Detailed Description

A base class for implementing IRHITransientResourceAllocator for a virtual aliasing placed resource heap allocation strategy.

Constructor & Destructor Documentation

◆ FRHITransientResourceHeapAllocator()

FRHITransientResourceHeapAllocator::FRHITransientResourceHeapAllocator ( FRHITransientHeapCache InHeapCache)

◆ ~FRHITransientResourceHeapAllocator()

FRHITransientResourceHeapAllocator::~FRHITransientResourceHeapAllocator ( )
default

Member Function Documentation

◆ CreateBufferInternal()

FRHITransientBuffer * FRHITransientResourceHeapAllocator::CreateBufferInternal ( const FRHIBufferCreateInfo CreateInfo,
const TCHAR DebugName,
const FRHITransientAllocationFences Fences,
uint32  BufferSize,
uint32  BufferAlignment,
FRHITransientHeap::FCreateBufferFunction  CreateBufferFunction 
)
protected

Allocates a buffer on a heap at a specific offset, returning a cached RHI transient buffer pointer, or null if the allocation failed. BufferSize and BufferAlignment are platform specific and must be derived from the buffer create info and passed in, along with a platform-specific buffer creation function if no cached resource if found.

◆ CreateTextureInternal()

FRHITransientTexture * FRHITransientResourceHeapAllocator::CreateTextureInternal ( const FRHITextureCreateInfo CreateInfo,
const TCHAR DebugName,
const FRHITransientAllocationFences Fences,
uint64  TextureSize,
uint32  TextureAlignment,
FRHITransientHeap::FCreateTextureFunction  CreateTextureFunction 
)
protected

Allocates a texture on a heap at a specific offset, returning a cached RHI transient texture pointer, or null if the allocation failed. TextureSize and TextureAlignment are platform specific and must be derived from the texture create info and passed in, along with a platform-specific texture creation function if no cached resource if found.

◆ CreateTransientResource()

TransientResourceType * FRHITransientResourceHeapAllocator::CreateTransientResource ( LambdaType &&  Lambda,
uint64  Hash,
uint64  Size,
const ResourceCreateInfo CreateInfo 
)
inline

◆ DeallocateMemory() [1/2]

void FRHITransientResourceHeapAllocator::DeallocateMemory ( FRHITransientBuffer Buffer,
const FRHITransientAllocationFences Fences 
)
overridevirtual

◆ DeallocateMemory() [2/2]

void FRHITransientResourceHeapAllocator::DeallocateMemory ( FRHITransientTexture Texture,
const FRHITransientAllocationFences Fences 
)
overridevirtual

◆ Flush()

void FRHITransientResourceHeapAllocator::Flush ( FRHICommandListImmediate RHICmdList,
FRHITransientAllocationStats OutAllocationStats 
)
overridevirtual

◆ GetHeaps()

TConstArrayView< FRHITransientHeap * > FRHITransientResourceHeapAllocator::GetHeaps ( ) const
inline

◆ SetCreateMode()

void FRHITransientResourceHeapAllocator::SetCreateMode ( ERHITransientResourceCreateMode  InCreateMode)
overridevirtual

Reimplemented from IRHITransientResourceAllocator.

Member Data Documentation

◆ HeapCache

FRHITransientHeapCache& FRHITransientResourceHeapAllocator::HeapCache

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