Navigation
API > API/Runtime > API/Runtime/RHICore
An RHI transient resource cache designed to optimize fetches for resources placed into a heap with an offset. The cache has a fixed capacity whereby no garbage collection will occur. Once that capacity is exceeded, garbage collection is invoked on resources older than a specified generation (where generation is incremented with each cycle of forfeiting acquired resources).
| Name | TRHITransientResourceCache |
| Type | class |
| Header File | /Engine/Source/Runtime/RHICore/Public/RHICoreTransientResourceAllocator.h |
| Include Path | #include "RHICoreTransientResourceAllocator.h" |
Syntax
template<typename TransientResourceType>
class TRHITransientResourceCache
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TRHITransientResourceCache
(
uint32 InCapacity, |
RHICoreTransientResourceAllocator.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~TRHITransientResourceCache() |
RHICoreTransientResourceAllocator.h |
Structs
| Name | Remarks |
|---|---|
| FCacheItem |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| kDefaultCapacity | const uint32 | RHICoreTransientResourceAllocator.h | |
| kDefaultGarbageCollectLatency | const uint32 | RHICoreTransientResourceAllocator.h | |
| kInfinity | const uint32 | RHICoreTransientResourceAllocator.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Allocated | TArray< TransientResourceType * > | RHICoreTransientResourceAllocator.h | ||
| Cache | TArray< FCacheItem > | RHICoreTransientResourceAllocator.h | ||
| Capacity | uint32 | RHICoreTransientResourceAllocator.h | ||
| GarbageCollectLatency | uint32 | RHICoreTransientResourceAllocator.h | ||
| HitCount | uint32 | RHICoreTransientResourceAllocator.h | ||
| MissCount | uint32 | RHICoreTransientResourceAllocator.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TransientResourceType * Acquire
(
uint64 Hash, |
RHICoreTransientResourceAllocator.h | ||
void Forfeit
(
uint64 CurrentFrameIndex |
RHICoreTransientResourceAllocator.h | ||
void Forfeit
(
uint64 CurrentFrameIndex, |
RHICoreTransientResourceAllocator.h | ||
TConstArrayView< TransientResourceType * > GetAllocated() |
RHICoreTransientResourceAllocator.h | ||
uint32 GetAllocatedCount() |
RHICoreTransientResourceAllocator.h | ||
uint32 GetCapacity() |
RHICoreTransientResourceAllocator.h | ||
uint32 GetHitCount() |
RHICoreTransientResourceAllocator.h | ||
float GetHitPercentage() |
RHICoreTransientResourceAllocator.h | ||
uint32 GetMissCount() |
RHICoreTransientResourceAllocator.h | ||
uint32 GetSize() |
RHICoreTransientResourceAllocator.h |