UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FRDGSubresourceState Struct Reference

#include <RenderGraphResources.h>

Public Member Functions

 FRDGSubresourceState ()=default
 
 FRDGSubresourceState (ERHIAccess InAccess)
 
 FRDGSubresourceState (ERHIPipeline Pipeline, FRDGPassHandle PassHandle)
 
void SetPass (ERHIPipeline Pipeline, FRDGPassHandle PassHandle)
 
void Validate ()
 
bool IsUsedBy (ERHIPipeline Pipeline) const
 
FRDGPassHandle GetLastPass () const
 
FRDGPassHandle GetFirstPass () const
 
ERHIPipeline GetPipelines () const
 

Static Public Member Functions

static bool IsTransitionRequired (const FRDGSubresourceState &Previous, const FRDGSubresourceState &Next)
 
static bool IsMergeAllowed (ERDGViewableResourceType ResourceType, const FRDGSubresourceState &Previous, const FRDGSubresourceState &Next)
 

Public Attributes

ERHIAccess Access = ERHIAccess::Unknown
 
FRDGPassHandlesByPipeline FirstPass
 
FRDGPassHandlesByPipeline LastPass
 
FRDGViewUniqueFilter NoUAVBarrierFilter
 
FRDGBufferReservedCommitHandle ReservedCommitHandle
 
EResourceTransitionFlags Flags = EResourceTransitionFlags::None
 
ERDGBarrierLocation BarrierLocation = ERDGBarrierLocation::Prologue
 

Detailed Description

Used for tracking the state of an individual subresource during execution.

Constructor & Destructor Documentation

◆ FRDGSubresourceState() [1/3]

FRDGSubresourceState::FRDGSubresourceState ( )
default

◆ FRDGSubresourceState() [2/3]

FRDGSubresourceState::FRDGSubresourceState ( ERHIAccess  InAccess)
inlineexplicit

◆ FRDGSubresourceState() [3/3]

FRDGSubresourceState::FRDGSubresourceState ( ERHIPipeline  Pipeline,
FRDGPassHandle  PassHandle 
)
inlineexplicit

Member Function Documentation

◆ GetFirstPass()

FRDGPassHandle FRDGSubresourceState::GetFirstPass ( ) const
inline

Returns the first pass across either pipe.

◆ GetLastPass()

FRDGPassHandle FRDGSubresourceState::GetLastPass ( ) const
inline

Returns the last pass across either pipe.

◆ GetPipelines()

ERHIPipeline FRDGSubresourceState::GetPipelines ( ) const
inline

Returns the pipeline mask this state is used on.

◆ IsMergeAllowed()

bool FRDGSubresourceState::IsMergeAllowed ( ERDGViewableResourceType  ResourceType,
const FRDGSubresourceState Previous,
const FRDGSubresourceState Next 
)
static

Given a before and after state, returns whether they can be merged into a single state.

State merging occurs during compilation and before resource transitions are collected. It serves to remove the bulk of unnecessary transitions by looking ahead in the resource usage chain. A resource transition cannot occur within a merged state, so a merge is not allowed to proceed if a barrier might be required. Merging is also where multi-pipe transitions are determined, if supported by the platform.

◆ IsTransitionRequired()

bool FRDGSubresourceState::IsTransitionRequired ( const FRDGSubresourceState Previous,
const FRDGSubresourceState Next 
)
static

Given a before and after state, returns whether a resource barrier is required.

◆ IsUsedBy()

bool FRDGSubresourceState::IsUsedBy ( ERHIPipeline  Pipeline) const
inline

Returns whether the state is used by the pipeline.

◆ SetPass()

PGO_LINK_DISABLE_WARNINGS void FRDGSubresourceState::SetPass ( ERHIPipeline  Pipeline,
FRDGPassHandle  PassHandle 
)
inline

Initializes the first and last pass and the pipeline. Clears any other pass state.

◆ Validate()

void FRDGSubresourceState::Validate ( )
inline

Validates that the state is in a correct configuration for use.

Member Data Documentation

◆ Access

ERHIAccess FRDGSubresourceState::Access = ERHIAccess::Unknown

The last used access on the pass.

◆ BarrierLocation

ERDGBarrierLocation FRDGSubresourceState::BarrierLocation = ERDGBarrierLocation::Prologue

Used to specify whether the state is applied during the prologue or epilogue of the pass. This is only used when transitioning on the same pass / pipe.

◆ FirstPass

FRDGPassHandlesByPipeline FRDGSubresourceState::FirstPass

The first pass in this state.

◆ Flags

The last used transition flags on the pass.

◆ LastPass

FRDGPassHandlesByPipeline FRDGSubresourceState::LastPass

The last pass in this state.

◆ NoUAVBarrierFilter

FRDGViewUniqueFilter FRDGSubresourceState::NoUAVBarrierFilter

The last no-UAV barrier to be used by this subresource.

◆ ReservedCommitHandle

FRDGBufferReservedCommitHandle FRDGSubresourceState::ReservedCommitHandle

Whether this subresource state represents a commit operation for a reserved resource.


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