Navigation
API > API/Runtime > API/Runtime/RHI
This data structure contains fence values used for allocating / deallocating transient memory regions for transient resources. A memory region can be re-used if the deallocation fences from the discarding resource and the allocation fences for the acquiring resource are not executing simultaneously on both the graphics | async compute pipe on the GPU timeline.
Allocation events are always on a single pipeline, while deallocation events can happen on multiple pipelines at the same time. Async compute is represented using three fence values: one for the async compute pipe, and two for the fork / join points on the graphics pipe. If fences are active on both pipes at the same time, the graphics fence must be contained within the async compute fork / join region.
| Name | FRHITransientAllocationFences |
| Type | class |
| Header File | /Engine/Source/Runtime/RHI/Public/RHITransientResourceAllocator.h |
| Include Path | #include "RHITransientResourceAllocator.h" |
Syntax
class FRHITransientAllocationFences
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| RHITransientResourceAllocator.h | |||
FRHITransientAllocationFences
(
ERHIPipeline InPipelines |
Expects the bitmask of the pipes this transient allocation was accessed on, which can be different from the fences themselves. | RHITransientResourceAllocator.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| Invalid | const uint32 | RHITransientResourceAllocator.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AsyncCompute | uint32 | RHITransientResourceAllocator.h | ||
| Graphics | uint32 | RHITransientResourceAllocator.h | ||
| GraphicsForkJoin | TInterval< uint32 > | RHITransientResourceAllocator.h | ||
| Pipelines | ERHIPipeline | RHITransientResourceAllocator.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ERHIPipeline GetPipelines() |
RHITransientResourceAllocator.h | ||
uint32 GetSinglePipeline() |
RHITransientResourceAllocator.h | ||
bool IsSinglePipeline() |
RHITransientResourceAllocator.h | ||
void SetAsyncCompute
(
uint32 InAsyncCompute, |
RHITransientResourceAllocator.h | ||
void SetGraphics
(
uint32 InGraphics |
RHITransientResourceAllocator.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool Contains
(
const FRHITransientAllocationFences& Discard, |
Returns whether two regions described by the discard and acquire fences contain each other. If they do, that means the memory would being used by both pipes simultaneously and cannot be aliased. | RHITransientResourceAllocator.h | |
static bool Contains
(
TInterval< uint32 > Interval, |
RHITransientResourceAllocator.h | ||
static uint32 GetAcquireFence
(
const FRHITransientAllocationFences& Discard, |
Returns the fence at which the Acquire operation can occur for the given pair of resources transitioning from Discard -> Acquire. | RHITransientResourceAllocator.h |