Navigation
API > API/Runtime > API/Runtime/RHICore
References
| Module | RHICore |
| Header | /Engine/Source/Runtime/RHICore/Public/RHICoreTransientResourceAllocator.h |
| Include | #include "RHICoreTransientResourceAllocator.h" |
Syntax
template<typename TransientResourceType>
class TRHITransientResourceCache
Remarks
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).
Constructors
| Type | Name | Description | |
|---|---|---|---|
TRHITransientResourceCache
(
uint32 InCapacity, |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| TransientResourceType * | Acquire
(
uint64 Hash, |
||
| void | Forfeit
(
uint64 CurrentFrameIndex |
||
| void | Forfeit
(
uint64 CurrentFrameIndex, |
||
| TConstArrayView< TransientResourceType * > | GetAllocated () |
||
| uint32 | |||
| uint32 | GetCapacity () |
||
| uint32 | GetHitCount () |
||
| float | |||
| uint32 | GetMissCount () |
||
| uint32 | GetSize () |
Constants
| Name | Description |
|---|---|
| kDefaultCapacity | |
| kDefaultGarbageCollectLatency | |
| kInfinity |