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

#include <RenderGraphBuilder.h>

+ Inheritance diagram for FRDGBuilder:

Public Member Functions

RENDERCORE_API FRDGBuilder (FRHICommandListImmediate &RHICmdList, FRDGEventName Name={}, ERDGBuilderFlags Flags=ERDGBuilderFlags::None, EShaderPlatform ShaderPlatform=GMaxRHIShaderPlatform)
 
 FRDGBuilder (const FRDGBuilder &)=delete
 
RENDERCORE_API ~FRDGBuilder ()
 
FRDGTextureFindExternalTexture (FRHITexture *Texture) const
 
FRDGTextureFindExternalTexture (IPooledRenderTarget *ExternalPooledTexture) const
 
FRDGBufferFindExternalBuffer (FRHIBuffer *Buffer) const
 
FRDGBufferFindExternalBuffer (FRDGPooledBuffer *ExternalPooledBuffer) const
 
RENDERCORE_API FRDGTextureRef RegisterExternalTexture (const TRefCountPtr< IPooledRenderTarget > &ExternalPooledTexture, ERDGTextureFlags Flags=ERDGTextureFlags::None)
 
RENDERCORE_API FRDGTextureRef RegisterExternalTexture (const TRefCountPtr< IPooledRenderTarget > &ExternalPooledTexture, const TCHAR *NameIfNotRegistered, ERDGTextureFlags Flags=ERDGTextureFlags::None)
 
RENDERCORE_API FRDGBufferRef RegisterExternalBuffer (const TRefCountPtr< FRDGPooledBuffer > &ExternalPooledBuffer, ERDGBufferFlags Flags=ERDGBufferFlags::None)
 
RENDERCORE_API FRDGBufferRef RegisterExternalBuffer (const TRefCountPtr< FRDGPooledBuffer > &ExternalPooledBuffer, ERDGBufferFlags Flags, ERHIAccess AccessFinal)
 
RENDERCORE_API FRDGBufferRef RegisterExternalBuffer (const TRefCountPtr< FRDGPooledBuffer > &ExternalPooledBuffer, const TCHAR *NameIfNotRegistered, ERDGBufferFlags Flags=ERDGBufferFlags::None)
 
FRDGTextureRef CreateTexture (const FRDGTextureDesc &Desc, const TCHAR *Name, ERDGTextureFlags Flags=ERDGTextureFlags::None)
 
FRDGBufferRef CreateBuffer (const FRDGBufferDesc &Desc, const TCHAR *Name, ERDGBufferFlags Flags=ERDGBufferFlags::None)
 
FRDGBufferRef CreateBuffer (const FRDGBufferDesc &Desc, const TCHAR *Name, FRDGBufferNumElementsCallback &&NumElementsCallback, ERDGBufferFlags Flags=ERDGBufferFlags::None)
 
FRDGTextureSRVRef CreateSRV (const FRDGTextureSRVDesc &Desc)
 
FRDGBufferSRVRef CreateSRV (const FRDGBufferSRVDesc &Desc)
 
FRDGBufferSRVRef CreateSRV (FRDGBufferRef Buffer, EPixelFormat Format)
 
FRDGTextureUAVRef CreateUAV (const FRDGTextureUAVDesc &Desc, ERDGUnorderedAccessViewFlags Flags=ERDGUnorderedAccessViewFlags::None)
 
FRDGTextureUAVRef CreateUAV (FRDGTextureRef Texture, ERDGUnorderedAccessViewFlags Flags=ERDGUnorderedAccessViewFlags::None, EPixelFormat Format=PF_Unknown)
 
FRDGBufferUAVRef CreateUAV (const FRDGBufferUAVDesc &Desc, ERDGUnorderedAccessViewFlags Flags=ERDGUnorderedAccessViewFlags::None)
 
FRDGBufferUAVRef CreateUAV (FRDGBufferRef Buffer, EPixelFormat Format, ERDGUnorderedAccessViewFlags Flags=ERDGUnorderedAccessViewFlags::None)
 
template<typename ParameterStructType >
TRDGUniformBufferRef< ParameterStructTypeCreateUniformBuffer (const ParameterStructType *ParameterStruct)
 
voidAlloc (uint64 SizeInBytes, uint32 AlignInBytes=16)
 
template<typename PODType >
PODTypeAllocPOD ()
 
template<typename PODType >
PODTypeAllocPODArray (uint32 Count)
 
template<typename PODType >
TArrayView< PODTypeAllocPODArrayView (uint32 Count)
 
template<typename ObjectType , typename... TArgs>
ObjectType * AllocObject (TArgs &&... Args)
 
template<typename ObjectType >
TArray< ObjectType, SceneRenderingAllocator > & AllocArray ()
 
template<typename ParameterStructType >
ParameterStructTypeAllocParameters ()
 
template<typename ParameterStructType >
ParameterStructTypeAllocParameters (const ParameterStructType *StructToCopy)
 
template<typename BaseParameterStructType >
BaseParameterStructTypeAllocParameters (const FShaderParametersMetadata *ParametersMetadata)
 
template<typename BaseParameterStructType >
TStridedView< BaseParameterStructTypeAllocParameters (const FShaderParametersMetadata *ParametersMetadata, uint32 NumStructs)
 
void AddPostExecuteCallback (TUniqueFunction< void()> &&Callback)
 
template<typename ParameterStructType , typename ExecuteLambdaType >
FRDGPassRef AddPass (FRDGEventName &&Name, const ParameterStructType *ParameterStruct, ERDGPassFlags Flags, ExecuteLambdaType &&ExecuteLambda)
 
template<typename ExecuteLambdaType >
FRDGPassRef AddPass (FRDGEventName &&Name, const FShaderParametersMetadata *ParametersMetadata, const void *ParameterStruct, ERDGPassFlags Flags, ExecuteLambdaType &&ExecuteLambda)
 
template<typename ExecuteLambdaType >
FRDGPassRef AddPass (FRDGEventName &&Name, ERDGPassFlags Flags, ExecuteLambdaType &&ExecuteLambda)
 
template<typename ParameterStructType , typename LaunchLambdaType >
FRDGPassRef AddDispatchPass (FRDGEventName &&Name, const ParameterStructType *ParameterStruct, ERDGPassFlags Flags, LaunchLambdaType &&LaunchLambda)
 
void SetPassWorkload (FRDGPass *Pass, uint32 Workload)
 
RENDERCORE_API void AddPassDependency (FRDGPass *Producer, FRDGPass *Consumer)
 
void SetCommandListStat (TStatId StatId)
 
void AddDispatchHint ()
 
template<typename TaskLambda >
UE::Tasks::FTask AddSetupTask (TaskLambda &&Task, bool bCondition=true, ERDGSetupTaskWaitPoint WaitPoint=ERDGSetupTaskWaitPoint::Compile)
 
template<typename TaskLambda >
UE::Tasks::FTask AddSetupTask (TaskLambda &&Task, UE::Tasks::ETaskPriority Priority, bool bCondition=true, ERDGSetupTaskWaitPoint WaitPoint=ERDGSetupTaskWaitPoint::Compile)
 
template<typename TaskLambda >
UE::Tasks::FTask AddSetupTask (TaskLambda &&Task, UE::Tasks::FPipe *Pipe, UE::Tasks::ETaskPriority Priority=UE::Tasks::ETaskPriority::Normal, bool bCondition=true, ERDGSetupTaskWaitPoint WaitPoint=ERDGSetupTaskWaitPoint::Compile)
 
template<typename TaskLambda , typename PrerequisitesCollectionType >
UE::Tasks::FTask AddSetupTask (TaskLambda &&Task, PrerequisitesCollectionType &&Prerequisites, UE::Tasks::ETaskPriority Priority=UE::Tasks::ETaskPriority::Normal, bool bCondition=true, ERDGSetupTaskWaitPoint WaitPoint=ERDGSetupTaskWaitPoint::Compile)
 
template<typename TaskLambda , typename PrerequisitesCollectionType >
UE::Tasks::FTask AddSetupTask (TaskLambda &&Task, UE::Tasks::FPipe *Pipe, PrerequisitesCollectionType &&Prerequisites, UE::Tasks::ETaskPriority Priority=UE::Tasks::ETaskPriority::Normal, bool bCondition=true, ERDGSetupTaskWaitPoint WaitPoint=ERDGSetupTaskWaitPoint::Compile)
 
template<typename TaskLambda >
UE::Tasks::FTask AddCommandListSetupTask (TaskLambda &&Task, bool bCondition=true, ERDGSetupTaskWaitPoint WaitPoint=ERDGSetupTaskWaitPoint::Compile)
 
template<typename TaskLambda >
UE::Tasks::FTask AddCommandListSetupTask (TaskLambda &&Task, UE::Tasks::ETaskPriority Priority, bool bCondition=true, ERDGSetupTaskWaitPoint WaitPoint=ERDGSetupTaskWaitPoint::Compile)
 
template<typename TaskLambda >
UE::Tasks::FTask AddCommandListSetupTask (TaskLambda &&Task, UE::Tasks::FPipe *Pipe, UE::Tasks::ETaskPriority Priority=UE::Tasks::ETaskPriority::Normal, bool bCondition=true, ERDGSetupTaskWaitPoint WaitPoint=ERDGSetupTaskWaitPoint::Compile)
 
template<typename TaskLambda , typename PrerequisitesCollectionType >
UE::Tasks::FTask AddCommandListSetupTask (TaskLambda &&Task, PrerequisitesCollectionType &&Prerequisites, UE::Tasks::ETaskPriority Priority=UE::Tasks::ETaskPriority::Normal, bool bCondition=true, ERDGSetupTaskWaitPoint WaitPoint=ERDGSetupTaskWaitPoint::Compile)
 
template<typename TaskLambda , typename PrerequisitesCollectionType >
UE::Tasks::FTask AddCommandListSetupTask (TaskLambda &&Task, UE::Tasks::FPipe *Pipe, PrerequisitesCollectionType &&Prerequisites, UE::Tasks::ETaskPriority Priority=UE::Tasks::ETaskPriority::Normal, bool bCondition=true, ERDGSetupTaskWaitPoint WaitPoint=ERDGSetupTaskWaitPoint::Compile)
 
bool IsParallelSetupEnabled () const
 
bool IsAsyncComputeEnabled () const
 
RENDERCORE_API void SetFlushResourcesRHI ()
 
void SkipInitialAsyncComputeFence ()
 
void QueueBufferUpload (FRDGBufferRef Buffer, const void *InitialData, uint64 InitialDataSize, ERDGInitialDataFlags InitialDataFlags=ERDGInitialDataFlags::None)
 
template<typename ElementType >
void QueueBufferUpload (FRDGBufferRef Buffer, TArrayView< ElementType, int32 > Container, ERDGInitialDataFlags InitialDataFlags=ERDGInitialDataFlags::None)
 
void QueueBufferUpload (FRDGBufferRef Buffer, const void *InitialData, uint64 InitialDataSize, FRDGBufferInitialDataFreeCallback &&InitialDataFreeCallback)
 
template<typename ElementType >
void QueueBufferUpload (FRDGBufferRef Buffer, TArrayView< ElementType, int32 > Container, FRDGBufferInitialDataFreeCallback &&InitialDataFreeCallback)
 
void QueueBufferUpload (FRDGBufferRef Buffer, FRDGBufferInitialDataFillCallback &&InitialDataFillCallback)
 
void QueueBufferUpload (FRDGBufferRef Buffer, FRDGBufferInitialDataCallback &&InitialDataCallback, FRDGBufferInitialDataSizeCallback &&InitialDataSizeCallback)
 
void QueueBufferUpload (FRDGBufferRef Buffer, FRDGBufferInitialDataCallback &&InitialDataCallback, FRDGBufferInitialDataSizeCallback &&InitialDataSizeCallback, FRDGBufferInitialDataFreeCallback &&InitialDataFreeCallback)
 
void QueueCommitReservedBuffer (FRDGBufferRef Buffer, uint64 CommitSizeInBytes)
 
void QueueTextureExtraction (FRDGTextureRef Texture, TRefCountPtr< IPooledRenderTarget > *OutPooledTexturePtr, ERDGResourceExtractionFlags Flags=ERDGResourceExtractionFlags::None)
 
void QueueTextureExtraction (FRDGTextureRef Texture, TRefCountPtr< IPooledRenderTarget > *OutPooledTexturePtr, ERHIAccess AccessFinal, ERDGResourceExtractionFlags Flags=ERDGResourceExtractionFlags::None)
 
void QueueBufferExtraction (FRDGBufferRef Buffer, TRefCountPtr< FRDGPooledBuffer > *OutPooledBufferPtr)
 
void QueueBufferExtraction (FRDGBufferRef Buffer, TRefCountPtr< FRDGPooledBuffer > *OutPooledBufferPtr, ERHIAccess AccessFinal)
 
RENDERCORE_API const TRefCountPtr< IPooledRenderTarget > & ConvertToExternalTexture (FRDGTextureRef Texture)
 
RENDERCORE_API const TRefCountPtr< FRDGPooledBuffer > & ConvertToExternalBuffer (FRDGBufferRef Buffer)
 
RENDERCORE_API FRHIUniformBufferConvertToExternalUniformBuffer (FRDGUniformBufferRef UniformBuffer)
 
const TRefCountPtr< IPooledRenderTarget > & GetPooledTexture (FRDGTextureRef Texture) const
 
const TRefCountPtr< FRDGPooledBuffer > & GetPooledBuffer (FRDGBufferRef Buffer) const
 
void SetTextureAccessFinal (FRDGTextureRef Texture, ERHIAccess Access)
 
void SetBufferAccessFinal (FRDGBufferRef Buffer, ERHIAccess Access)
 
RENDERCORE_API void UseExternalAccessMode (FRDGViewableResource *Resource, ERHIAccess ReadOnlyAccess, ERHIPipeline Pipelines=ERHIPipeline::Graphics)
 
void UseExternalAccessMode (TArrayView< FRDGViewableResource *const > Resources, ERHIAccess ReadOnlyAccess, ERHIPipeline Pipelines=ERHIPipeline::Graphics)
 
RENDERCORE_API void UseInternalAccessMode (FRDGViewableResource *Resource)
 
void UseInternalAccessMode (TArrayView< FRDGViewableResource *const > Resources)
 
RENDERCORE_API void FlushSetupQueue ()
 
RENDERCORE_API void Execute ()
 
void RemoveUnusedTextureWarning (FRDGTextureRef Texture)
 
void RemoveUnusedBufferWarning (FRDGBufferRef Buffer)
 
template<typename FilterSubresourceLambdaType >
void AddTextureTransition (FRDGTexture *Texture, FRDGTextureSubresourceState &StateBefore, FRDGTextureSubresourceState &StateAfter, FilterSubresourceLambdaType &&FilterSubresourceLambda)
 
template<typename ExecuteLambdaType >
FRDGPassAddPass (FRDGEventName &&Name, ERDGPassFlags Flags, ExecuteLambdaType &&ExecuteLambda)
 
template<typename ExecuteLambdaType >
FRDGPassAddPass (FRDGEventName &&Name, const FShaderParametersMetadata *ParametersMetadata, const void *ParameterStruct, ERDGPassFlags Flags, ExecuteLambdaType &&ExecuteLambda)
 
template<typename ParameterStructType , typename ExecuteLambdaType >
FRDGPassAddPass (FRDGEventName &&Name, const ParameterStructType *ParameterStruct, ERDGPassFlags Flags, ExecuteLambdaType &&ExecuteLambda)
 
template<typename ParameterStructType , typename LaunchLambdaType >
FRDGPassAddDispatchPass (FRDGEventName &&Name, const ParameterStructType *ParameterStruct, ERDGPassFlags Flags, LaunchLambdaType &&LaunchLambda)
 
template<typename TaskLambdaType >
UE::Tasks::FTask AddSetupTask (TaskLambdaType &&TaskLambda, bool bCondition, ERDGSetupTaskWaitPoint WaitPoint)
 
template<typename TaskLambdaType >
UE::Tasks::FTask AddSetupTask (TaskLambdaType &&TaskLambda, UE::Tasks::ETaskPriority Priority, bool bCondition, ERDGSetupTaskWaitPoint WaitPoint)
 
template<typename TaskLambdaType >
UE::Tasks::FTask AddSetupTask (TaskLambdaType &&TaskLambda, UE::Tasks::FPipe *Pipe, UE::Tasks::ETaskPriority Priority, bool bCondition, ERDGSetupTaskWaitPoint WaitPoint)
 
template<typename TaskLambdaType , typename PrerequisitesCollectionType >
UE::Tasks::FTask AddSetupTask (TaskLambdaType &&TaskLambda, PrerequisitesCollectionType &&Prerequisites, UE::Tasks::ETaskPriority Priority, bool bCondition, ERDGSetupTaskWaitPoint WaitPoint)
 
template<typename TaskLambdaType , typename PrerequisitesCollectionType >
UE::Tasks::FTask AddSetupTask (TaskLambdaType &&TaskLambda, UE::Tasks::FPipe *Pipe, PrerequisitesCollectionType &&Prerequisites, UE::Tasks::ETaskPriority Priority, bool bCondition, ERDGSetupTaskWaitPoint WaitPoint)
 
template<typename TaskLambdaType >
UE::Tasks::FTask AddCommandListSetupTask (TaskLambdaType &&TaskLambda, bool bCondition, ERDGSetupTaskWaitPoint WaitPoint)
 
template<typename TaskLambdaType >
UE::Tasks::FTask AddCommandListSetupTask (TaskLambdaType &&TaskLambda, UE::Tasks::ETaskPriority TaskPriority, bool bCondition, ERDGSetupTaskWaitPoint WaitPoint)
 
template<typename TaskLambdaType >
UE::Tasks::FTask AddCommandListSetupTask (TaskLambdaType &&TaskLambda, UE::Tasks::FPipe *Pipe, UE::Tasks::ETaskPriority Priority, bool bCondition, ERDGSetupTaskWaitPoint WaitPoint)
 
template<typename TaskLambdaType , typename PrerequisitesCollectionType >
UE::Tasks::FTask AddCommandListSetupTask (TaskLambdaType &&TaskLambda, PrerequisitesCollectionType &&Prerequisites, UE::Tasks::ETaskPriority Priority, bool bCondition, ERDGSetupTaskWaitPoint WaitPoint)
 
template<typename TaskLambdaType , typename PrerequisitesCollectionType >
UE::Tasks::FTask AddCommandListSetupTask (TaskLambdaType &&TaskLambda, UE::Tasks::FPipe *Pipe, PrerequisitesCollectionType &&Prerequisites, UE::Tasks::ETaskPriority Priority, bool bCondition, ERDGSetupTaskWaitPoint WaitPoint)
 
- Public Member Functions inherited from FRDGScopeState
 FRDGScopeState (FRHICommandListImmediate &InRHICmdList, bool bImmediate, bool bParallelExecute)
 
bool ShouldEmitEvents () const
 
template<typename TScopeType >
bool ShouldAllocScope (TOptional< TRDGEventScopeGuard< TScopeType > > const &, ERDGScopeFlags Flags) const
 

Static Public Member Functions

static RENDERCORE_API void TickPoolElements ()
 
static RENDERCORE_API bool IsImmediateMode ()
 
static RENDERCORE_API void WaitForAsyncDeleteTask ()
 
static RENDERCORE_API const UE::Tasks::FTaskGetAsyncDeleteTask ()
 
static RENDERCORE_API void WaitForAsyncExecuteTask ()
 
static RENDERCORE_API const UE::Tasks::FTaskGetAsyncExecuteTask ()
 
static bool IsDumpingFrame ()
 
static void DumpDraw (const FRDGEventName &DrawEventName)
 
static bool IsDumpingDraws ()
 

Public Attributes

FRDGBlackboard Blackboard
 
- Public Attributes inherited from FRDGScopeState
FRHICommandListImmediateRHICmdList
 
friend FRDGScope_Budget
 

Additional Inherited Members

- Protected Attributes inherited from FRDGScopeState
struct FRDGScopeState::FState ScopeState
 
struct { 
 
   FRDGAllocator   Root 
 
   FRDGAllocator   Task 
 
   FRDGAllocator   Transition 
 
Allocators 
 

Detailed Description

Use the render graph builder to build up a graph of passes and then call Execute() to process them. Resource barriers and lifetimes are derived from RDG parameters in the pass parameter struct provided to each AddPass call. The resulting graph is compiled, culled, and executed in Execute(). The builder should be created on the stack and executed prior to destruction.

Constructor & Destructor Documentation

◆ FRDGBuilder() [1/2]

FRDGBuilder::FRDGBuilder ( FRHICommandListImmediate RHICmdList,
FRDGEventName  Name = {},
ERDGBuilderFlags  Flags = ERDGBuilderFlags::None,
EShaderPlatform  ShaderPlatform = GMaxRHIShaderPlatform 
)

◆ FRDGBuilder() [2/2]

FRDGBuilder::FRDGBuilder ( const FRDGBuilder )
delete

◆ ~FRDGBuilder()

FRDGBuilder::~FRDGBuilder ( )

Member Function Documentation

◆ AddCommandListSetupTask() [1/10]

template<typename TaskLambda >
UE::Tasks::FTask FRDGBuilder::AddCommandListSetupTask ( TaskLambda &&  Task,
bool  bCondition = true,
ERDGSetupTaskWaitPoint  WaitPoint = ERDGSetupTaskWaitPoint::Compile 
)

Launches a task that is synced prior to graph execution. If parallel execution is not enabled, the lambda is run immediately.

◆ AddCommandListSetupTask() [2/10]

UE::Tasks::FTask FRDGBuilder::AddCommandListSetupTask ( TaskLambda &&  Task,
PrerequisitesCollectionType &&  Prerequisites,
UE::Tasks::ETaskPriority  Priority = UE::Tasks::ETaskPriority::Normal,
bool  bCondition = true,
ERDGSetupTaskWaitPoint  WaitPoint = ERDGSetupTaskWaitPoint::Compile 
)

◆ AddCommandListSetupTask() [3/10]

template<typename TaskLambda >
UE::Tasks::FTask FRDGBuilder::AddCommandListSetupTask ( TaskLambda &&  Task,
UE::Tasks::ETaskPriority  Priority,
bool  bCondition = true,
ERDGSetupTaskWaitPoint  WaitPoint = ERDGSetupTaskWaitPoint::Compile 
)

◆ AddCommandListSetupTask() [4/10]

UE::Tasks::FTask FRDGBuilder::AddCommandListSetupTask ( TaskLambda &&  Task,
UE::Tasks::FPipe Pipe,
PrerequisitesCollectionType &&  Prerequisites,
UE::Tasks::ETaskPriority  Priority = UE::Tasks::ETaskPriority::Normal,
bool  bCondition = true,
ERDGSetupTaskWaitPoint  WaitPoint = ERDGSetupTaskWaitPoint::Compile 
)

◆ AddCommandListSetupTask() [5/10]

template<typename TaskLambda >
UE::Tasks::FTask FRDGBuilder::AddCommandListSetupTask ( TaskLambda &&  Task,
UE::Tasks::FPipe Pipe,
UE::Tasks::ETaskPriority  Priority = UE::Tasks::ETaskPriority::Normal,
bool  bCondition = true,
ERDGSetupTaskWaitPoint  WaitPoint = ERDGSetupTaskWaitPoint::Compile 
)

◆ AddCommandListSetupTask() [6/10]

template<typename TaskLambdaType >
UE::Tasks::FTask FRDGBuilder::AddCommandListSetupTask ( TaskLambdaType &&  TaskLambda,
bool  bCondition,
ERDGSetupTaskWaitPoint  WaitPoint 
)
inline

◆ AddCommandListSetupTask() [7/10]

template<typename TaskLambdaType , typename PrerequisitesCollectionType >
UE::Tasks::FTask FRDGBuilder::AddCommandListSetupTask ( TaskLambdaType &&  TaskLambda,
PrerequisitesCollectionType &&  Prerequisites,
UE::Tasks::ETaskPriority  Priority,
bool  bCondition,
ERDGSetupTaskWaitPoint  WaitPoint 
)
inline

◆ AddCommandListSetupTask() [8/10]

template<typename TaskLambdaType >
UE::Tasks::FTask FRDGBuilder::AddCommandListSetupTask ( TaskLambdaType &&  TaskLambda,
UE::Tasks::ETaskPriority  TaskPriority,
bool  bCondition,
ERDGSetupTaskWaitPoint  WaitPoint 
)
inline

◆ AddCommandListSetupTask() [9/10]

template<typename TaskLambdaType , typename PrerequisitesCollectionType >
UE::Tasks::FTask FRDGBuilder::AddCommandListSetupTask ( TaskLambdaType &&  TaskLambda,
UE::Tasks::FPipe Pipe,
PrerequisitesCollectionType &&  Prerequisites,
UE::Tasks::ETaskPriority  Priority,
bool  bCondition,
ERDGSetupTaskWaitPoint  WaitPoint 
)

◆ AddCommandListSetupTask() [10/10]

template<typename TaskLambdaType >
UE::Tasks::FTask FRDGBuilder::AddCommandListSetupTask ( TaskLambdaType &&  TaskLambda,
UE::Tasks::FPipe Pipe,
UE::Tasks::ETaskPriority  Priority,
bool  bCondition,
ERDGSetupTaskWaitPoint  WaitPoint 
)
inline

◆ AddDispatchHint()

void FRDGBuilder::AddDispatchHint ( )
inline

A hint to the builder to flush work to the RHI thread after the last queued pass on the execution timeline.

◆ AddDispatchPass() [1/2]

FRDGPassRef FRDGBuilder::AddDispatchPass ( FRDGEventName &&  Name,
const ParameterStructType ParameterStruct,
ERDGPassFlags  Flags,
LaunchLambdaType &&  LaunchLambda 
)

Adds a pass that takes a FRDGDispatchPassBuilder instead of a RHI command list. The lambda should create command lists and launch tasks to record commands into them. Each task should call EndRenderPass() (if raster) and FinishRecording() to complete each command list. The user is responsible for task management of dispatched command lists.

◆ AddDispatchPass() [2/2]

FRDGPass * FRDGBuilder::AddDispatchPass ( FRDGEventName &&  Name,
const ParameterStructType ParameterStruct,
ERDGPassFlags  Flags,
LaunchLambdaType &&  LaunchLambda 
)

◆ AddPass() [1/6]

FRDGPassRef FRDGBuilder::AddPass ( FRDGEventName &&  Name,
const FShaderParametersMetadata ParametersMetadata,
const void ParameterStruct,
ERDGPassFlags  Flags,
ExecuteLambdaType &&  ExecuteLambda 
)

Adds a lambda pass to the graph with a runtime-generated parameter struct.

◆ AddPass() [2/6]

FRDGPass * FRDGBuilder::AddPass ( FRDGEventName &&  Name,
const FShaderParametersMetadata ParametersMetadata,
const void ParameterStruct,
ERDGPassFlags  Flags,
ExecuteLambdaType &&  ExecuteLambda 
)

◆ AddPass() [3/6]

FRDGPassRef FRDGBuilder::AddPass ( FRDGEventName &&  Name,
const ParameterStructType ParameterStruct,
ERDGPassFlags  Flags,
ExecuteLambdaType &&  ExecuteLambda 
)

Adds a lambda pass to the graph with an accompanied pass parameter struct.

RDG resources declared in the struct (via _RDG parameter macros) are safe to access in the lambda. The pass parameter struct should be allocated by AllocParameters(), and once passed in, should not be mutated. It is safe to provide the same parameter struct to multiple passes, so long as it is kept immutable. The lambda is deferred until execution unless the immediate debug mode is enabled. All lambda captures should assume deferral of execution.

The lambda must include a single RHI command list as its parameter. The exact type of command list depends on the workload. For example, use FRHIComputeCommandList& for Compute / AsyncCompute workloads. Raster passes should use FRHICommandList&. Prefer not to use FRHICommandListImmediate& unless actually required.

Declare the type of GPU workload (i.e. Copy, Compute / AsyncCompute, Graphics) to the pass via the Flags argument. This is used to determine async compute regions, render pass setup / merging, RHI transition accesses, etc. Other flags exist for specialized purposes, like forcing a pass to never be culled (NeverCull). See ERDGPassFlags for more info.

The pass name is used by debugging / profiling tools.

◆ AddPass() [4/6]

FRDGPass * FRDGBuilder::AddPass ( FRDGEventName &&  Name,
const ParameterStructType ParameterStruct,
ERDGPassFlags  Flags,
ExecuteLambdaType &&  ExecuteLambda 
)

◆ AddPass() [5/6]

FRDGPassRef FRDGBuilder::AddPass ( FRDGEventName &&  Name,
ERDGPassFlags  Flags,
ExecuteLambdaType &&  ExecuteLambda 
)

Adds a lambda pass to the graph without any parameters. This useful for deferring RHI work onto the graph timeline, or incrementally porting code to use the graph system. NeverCull and SkipRenderPass (if Raster) are implicitly added to Flags. AsyncCompute is not allowed. It is never permitted to access a created (i.e. not externally registered) RDG resource outside of passes it is registered with, as the RHI lifetime is not guaranteed.

◆ AddPass() [6/6]

FRDGPass * FRDGBuilder::AddPass ( FRDGEventName &&  Name,
ERDGPassFlags  Flags,
ExecuteLambdaType &&  ExecuteLambda 
)

◆ AddPassDependency()

void FRDGBuilder::AddPassDependency ( FRDGPass Producer,
FRDGPass Consumer 
)

Adds a user-defined dependency between two passes. This can be used to fine-tune async compute overlap by forcing a sync point.

◆ AddPostExecuteCallback()

void FRDGBuilder::AddPostExecuteCallback ( TUniqueFunction< void()> &&  Callback)
inline

Adds a callback that is called after pass execution is complete.

◆ AddSetupTask() [1/10]

template<typename TaskLambda >
UE::Tasks::FTask FRDGBuilder::AddSetupTask ( TaskLambda &&  Task,
bool  bCondition = true,
ERDGSetupTaskWaitPoint  WaitPoint = ERDGSetupTaskWaitPoint::Compile 
)

Launches a task that is synced prior to graph execution. If parallel execution is not enabled, the lambda is run immediately.

◆ AddSetupTask() [2/10]

UE::Tasks::FTask FRDGBuilder::AddSetupTask ( TaskLambda &&  Task,
PrerequisitesCollectionType &&  Prerequisites,
UE::Tasks::ETaskPriority  Priority = UE::Tasks::ETaskPriority::Normal,
bool  bCondition = true,
ERDGSetupTaskWaitPoint  WaitPoint = ERDGSetupTaskWaitPoint::Compile 
)

◆ AddSetupTask() [3/10]

template<typename TaskLambda >
UE::Tasks::FTask FRDGBuilder::AddSetupTask ( TaskLambda &&  Task,
UE::Tasks::ETaskPriority  Priority,
bool  bCondition = true,
ERDGSetupTaskWaitPoint  WaitPoint = ERDGSetupTaskWaitPoint::Compile 
)

◆ AddSetupTask() [4/10]

UE::Tasks::FTask FRDGBuilder::AddSetupTask ( TaskLambda &&  Task,
UE::Tasks::FPipe Pipe,
PrerequisitesCollectionType &&  Prerequisites,
UE::Tasks::ETaskPriority  Priority = UE::Tasks::ETaskPriority::Normal,
bool  bCondition = true,
ERDGSetupTaskWaitPoint  WaitPoint = ERDGSetupTaskWaitPoint::Compile 
)

◆ AddSetupTask() [5/10]

template<typename TaskLambda >
UE::Tasks::FTask FRDGBuilder::AddSetupTask ( TaskLambda &&  Task,
UE::Tasks::FPipe Pipe,
UE::Tasks::ETaskPriority  Priority = UE::Tasks::ETaskPriority::Normal,
bool  bCondition = true,
ERDGSetupTaskWaitPoint  WaitPoint = ERDGSetupTaskWaitPoint::Compile 
)

◆ AddSetupTask() [6/10]

template<typename TaskLambdaType >
UE::Tasks::FTask FRDGBuilder::AddSetupTask ( TaskLambdaType &&  TaskLambda,
bool  bCondition,
ERDGSetupTaskWaitPoint  WaitPoint 
)
inline

◆ AddSetupTask() [7/10]

template<typename TaskLambdaType , typename PrerequisitesCollectionType >
UE::Tasks::FTask FRDGBuilder::AddSetupTask ( TaskLambdaType &&  TaskLambda,
PrerequisitesCollectionType &&  Prerequisites,
UE::Tasks::ETaskPriority  Priority,
bool  bCondition,
ERDGSetupTaskWaitPoint  WaitPoint 
)
inline

◆ AddSetupTask() [8/10]

template<typename TaskLambdaType >
UE::Tasks::FTask FRDGBuilder::AddSetupTask ( TaskLambdaType &&  TaskLambda,
UE::Tasks::ETaskPriority  Priority,
bool  bCondition,
ERDGSetupTaskWaitPoint  WaitPoint 
)
inline

◆ AddSetupTask() [9/10]

template<typename TaskLambdaType , typename PrerequisitesCollectionType >
UE::Tasks::FTask FRDGBuilder::AddSetupTask ( TaskLambdaType &&  TaskLambda,
UE::Tasks::FPipe Pipe,
PrerequisitesCollectionType &&  Prerequisites,
UE::Tasks::ETaskPriority  Priority,
bool  bCondition,
ERDGSetupTaskWaitPoint  WaitPoint 
)

◆ AddSetupTask() [10/10]

template<typename TaskLambdaType >
UE::Tasks::FTask FRDGBuilder::AddSetupTask ( TaskLambdaType &&  TaskLambda,
UE::Tasks::FPipe Pipe,
UE::Tasks::ETaskPriority  Priority,
bool  bCondition,
ERDGSetupTaskWaitPoint  WaitPoint 
)
inline

◆ AddTextureTransition()

void FRDGBuilder::AddTextureTransition ( FRDGTexture Texture,
FRDGTextureSubresourceState StateBefore,
FRDGTextureSubresourceState StateAfter,
FilterSubresourceLambdaType &&  FilterSubresourceLambda 
)

◆ Alloc()

void * FRDGBuilder::Alloc ( uint64  SizeInBytes,
uint32  AlignInBytes = 16 
)
inline

Allocates raw memory using an allocator tied to the lifetime of the graph.

◆ AllocArray()

template<typename ObjectType >
TArray< ObjectType, SceneRenderingAllocator > & FRDGBuilder::AllocArray ( )
inline

Allocates a C++ array where both the array and the data are tied to the lifetime of the graph. The array itself is safe to pass into an RDG lambda.

◆ AllocObject()

template<typename ObjectType , typename... TArgs>
ObjectType * FRDGBuilder::AllocObject ( TArgs &&...  Args)
inline

Allocates a C++ object using an allocator tied to the lifetime of the graph. Will destruct the object.

◆ AllocParameters() [1/4]

ParameterStructType * FRDGBuilder::AllocParameters ( )
inline

Allocates a parameter struct with a lifetime tied to graph execution.

◆ AllocParameters() [2/4]

BaseParameterStructType * FRDGBuilder::AllocParameters ( const FShaderParametersMetadata ParametersMetadata)

Allocates a data-driven parameter struct with a lifetime tied to graph execution.

◆ AllocParameters() [3/4]

TStridedView< BaseParameterStructType > FRDGBuilder::AllocParameters ( const FShaderParametersMetadata ParametersMetadata,
uint32  NumStructs 
)

Allocates an array of data-driven parameter structs with a lifetime tied to graph execution.

◆ AllocParameters() [4/4]

ParameterStructType * FRDGBuilder::AllocParameters ( const ParameterStructType StructToCopy)
inline

Allocates a parameter struct with a lifetime tied to graph execution, and copies contents from an existing parameters struct.

◆ AllocPOD()

template<typename PODType >
PODType * FRDGBuilder::AllocPOD ( )
inline

Allocates POD memory using an allocator tied to the lifetime of the graph. Does not construct / destruct.

◆ AllocPODArray()

template<typename PODType >
PODType * FRDGBuilder::AllocPODArray ( uint32  Count)
inline

Allocates POD memory using an allocator tied to the lifetime of the graph. Does not construct / destruct.

◆ AllocPODArrayView()

template<typename PODType >
TArrayView< PODType > FRDGBuilder::AllocPODArrayView ( uint32  Count)

Allocates POD memory using an allocator tied to the lifetime of the graph. Does not construct / destruct.

◆ ConvertToExternalBuffer()

const TRefCountPtr< FRDGPooledBuffer > & FRDGBuilder::ConvertToExternalBuffer ( FRDGBufferRef  Buffer)

◆ ConvertToExternalTexture()

const TRefCountPtr< IPooledRenderTarget > & FRDGBuilder::ConvertToExternalTexture ( FRDGTextureRef  Texture)

For graph-created resources, this forces immediate allocation of the underlying pooled resource, effectively promoting it to an external resource. This will increase memory pressure, but allows for querying the pooled resource with GetPooled{Texture, Buffer}. This is primarily used as an aid for porting code incrementally to RDG.

◆ ConvertToExternalUniformBuffer()

FRHIUniformBuffer * FRDGBuilder::ConvertToExternalUniformBuffer ( FRDGUniformBufferRef  UniformBuffer)

For a graph-created uniform buffer, this forces immediate allocation of the underlying resource, effectively promoting it to an external resource. This will increase memory pressure, but allows access to the RHI resource. Graph resources that are referenced in the buffer will be converted to external. This is primarily used as an aid for porting code incrementally to RDG.

◆ CreateBuffer() [1/2]

FRDGBufferRef FRDGBuilder::CreateBuffer ( const FRDGBufferDesc Desc,
const TCHAR Name,
ERDGBufferFlags  Flags = ERDGBufferFlags::None 
)
inline

Create graph tracked buffer from a descriptor. The CPU memory is guaranteed to be valid through execution of the graph, at which point it is released. The underlying RHI buffer lifetime is only guaranteed for passes which declare the buffer in the pass parameter struct. The name is the name used for GPU debugging tools.

◆ CreateBuffer() [2/2]

FRDGBufferRef FRDGBuilder::CreateBuffer ( const FRDGBufferDesc Desc,
const TCHAR Name,
FRDGBufferNumElementsCallback &&  NumElementsCallback,
ERDGBufferFlags  Flags = ERDGBufferFlags::None 
)
inline

A variant of CreateBuffer where users supply NumElements through a callback. This allows creating buffers with sizes unknown at creation time. The callback is called before executing the most recent RDG pass that references the buffer so data must be ready before that.

◆ CreateSRV() [1/3]

FRDGBufferSRVRef FRDGBuilder::CreateSRV ( const FRDGBufferSRVDesc Desc)
inline

Create graph tracked SRV for a buffer from a descriptor.

◆ CreateSRV() [2/3]

FRDGTextureSRVRef FRDGBuilder::CreateSRV ( const FRDGTextureSRVDesc Desc)
inline

Create graph tracked SRV for a texture from a descriptor.

◆ CreateSRV() [3/3]

FRDGBufferSRVRef FRDGBuilder::CreateSRV ( FRDGBufferRef  Buffer,
EPixelFormat  Format 
)
inline

◆ CreateTexture()

FRDGTextureRef FRDGBuilder::CreateTexture ( const FRDGTextureDesc Desc,
const TCHAR Name,
ERDGTextureFlags  Flags = ERDGTextureFlags::None 
)
inline

Create graph tracked texture from a descriptor. The CPU memory is guaranteed to be valid through execution of the graph, at which point it is released. The underlying RHI texture lifetime is only guaranteed for passes which declare the texture in the pass parameter struct. The name is the name used for GPU debugging tools and the the VisualizeTexture/Vis command.

◆ CreateUAV() [1/4]

FRDGBufferUAVRef FRDGBuilder::CreateUAV ( const FRDGBufferUAVDesc Desc,
ERDGUnorderedAccessViewFlags  Flags = ERDGUnorderedAccessViewFlags::None 
)
inline

Create graph tracked UAV for a buffer from a descriptor.

◆ CreateUAV() [2/4]

FRDGTextureUAVRef FRDGBuilder::CreateUAV ( const FRDGTextureUAVDesc Desc,
ERDGUnorderedAccessViewFlags  Flags = ERDGUnorderedAccessViewFlags::None 
)
inline

Create graph tracked UAV for a texture from a descriptor.

◆ CreateUAV() [3/4]

FRDGBufferUAVRef FRDGBuilder::CreateUAV ( FRDGBufferRef  Buffer,
EPixelFormat  Format,
ERDGUnorderedAccessViewFlags  Flags = ERDGUnorderedAccessViewFlags::None 
)
inline

◆ CreateUAV() [4/4]

◆ CreateUniformBuffer()

TRDGUniformBufferRef< ParameterStructType > FRDGBuilder::CreateUniformBuffer ( const ParameterStructType ParameterStruct)

Creates a graph tracked uniform buffer which can be attached to passes. These uniform buffers require some care because they will bulk transition all resources. The graph will only transition resources which are not also bound for write access by the pass.

◆ DumpDraw()

static void FRDGBuilder::DumpDraw ( const FRDGEventName DrawEventName)
inlinestatic

◆ Execute()

void FRDGBuilder::Execute ( )

Executes the queued passes, managing setting of render targets (RHI RenderPasses), resource transitions and queued texture extraction.

◆ FindExternalBuffer() [1/2]

FRDGBuffer * FRDGBuilder::FindExternalBuffer ( FRDGPooledBuffer ExternalPooledBuffer) const
inline

◆ FindExternalBuffer() [2/2]

FRDGBuffer * FRDGBuilder::FindExternalBuffer ( FRHIBuffer Buffer) const
inline

Finds an RDG buffer associated with the external buffer, or returns null if none is found.

◆ FindExternalTexture() [1/2]

FRDGTexture * FRDGBuilder::FindExternalTexture ( FRHITexture Texture) const
inline

Finds an RDG texture associated with the external texture, or returns null if none is found.

◆ FindExternalTexture() [2/2]

FRDGTexture * FRDGBuilder::FindExternalTexture ( IPooledRenderTarget ExternalPooledTexture) const
inline

◆ FlushSetupQueue()

void FRDGBuilder::FlushSetupQueue ( )

Flushes all queued passes to an async task to perform setup work.

◆ GetAsyncDeleteTask()

const UE::Tasks::FTask & FRDGBuilder::GetAsyncDeleteTask ( )
static

Returns the last RDG chained deletion task that was launched.

◆ GetAsyncExecuteTask()

const UE::Tasks::FTask & FRDGBuilder::GetAsyncExecuteTask ( )
static

Returns the last RDG chained execution task that was launched.

◆ GetPooledBuffer()

const TRefCountPtr< FRDGPooledBuffer > & FRDGBuilder::GetPooledBuffer ( FRDGBufferRef  Buffer) const
inline

◆ GetPooledTexture()

const TRefCountPtr< IPooledRenderTarget > & FRDGBuilder::GetPooledTexture ( FRDGTextureRef  Texture) const
inline

Performs an immediate query for the underlying pooled resource. This is only allowed for external or extracted resources.

◆ IsAsyncComputeEnabled()

bool FRDGBuilder::IsAsyncComputeEnabled ( ) const
inline

◆ IsDumpingDraws()

static bool FRDGBuilder::IsDumpingDraws ( )
inlinestatic

◆ IsDumpingFrame()

static bool FRDGBuilder::IsDumpingFrame ( )
inlinestatic

◆ IsImmediateMode()

bool FRDGBuilder::IsImmediateMode ( )
static

Whether RDG is running in immediate mode.

◆ IsParallelSetupEnabled()

bool FRDGBuilder::IsParallelSetupEnabled ( ) const
inline

Whether RDG will launch async tasks when AddSetup{CommandList}Task is called.

◆ QueueBufferExtraction() [1/2]

void FRDGBuilder::QueueBufferExtraction ( FRDGBufferRef  Buffer,
TRefCountPtr< FRDGPooledBuffer > *  OutPooledBufferPtr 
)
inline

Queues a pooled buffer extraction to happen at the end of graph execution. For graph-created buffers, this extends the lifetime of the GPU resource until execution, at which point the pointer is filled. If specified, the buffer is transitioned to the AccessFinal state, or kDefaultAccessFinal otherwise.

◆ QueueBufferExtraction() [2/2]

void FRDGBuilder::QueueBufferExtraction ( FRDGBufferRef  Buffer,
TRefCountPtr< FRDGPooledBuffer > *  OutPooledBufferPtr,
ERHIAccess  AccessFinal 
)
inline

◆ QueueBufferUpload() [1/7]

void FRDGBuilder::QueueBufferUpload ( FRDGBufferRef  Buffer,
const void InitialData,
uint64  InitialDataSize,
ERDGInitialDataFlags  InitialDataFlags = ERDGInitialDataFlags::None 
)
inline

Queues a buffer upload operation prior to execution. The resource lifetime is extended and the data is uploaded prior to executing passes.

◆ QueueBufferUpload() [2/7]

void FRDGBuilder::QueueBufferUpload ( FRDGBufferRef  Buffer,
const void InitialData,
uint64  InitialDataSize,
FRDGBufferInitialDataFreeCallback &&  InitialDataFreeCallback 
)
inline

Queues a buffer upload operation prior to execution. The resource lifetime is extended and the data is uploaded prior to executing passes.

◆ QueueBufferUpload() [3/7]

void FRDGBuilder::QueueBufferUpload ( FRDGBufferRef  Buffer,
FRDGBufferInitialDataCallback &&  InitialDataCallback,
FRDGBufferInitialDataSizeCallback &&  InitialDataSizeCallback 
)
inline

A variant where InitialData and InitialDataSize are supplied through callbacks. This allows queuing an upload with information unknown at creation time. The callbacks are called before RDG pass execution so data must be ready before that.

◆ QueueBufferUpload() [4/7]

void FRDGBuilder::QueueBufferUpload ( FRDGBufferRef  Buffer,
FRDGBufferInitialDataCallback &&  InitialDataCallback,
FRDGBufferInitialDataSizeCallback &&  InitialDataSizeCallback,
FRDGBufferInitialDataFreeCallback &&  InitialDataFreeCallback 
)
inline

◆ QueueBufferUpload() [5/7]

void FRDGBuilder::QueueBufferUpload ( FRDGBufferRef  Buffer,
FRDGBufferInitialDataFillCallback &&  InitialDataFillCallback 
)
inline

A variant where the buffer is mapped and the pointer / size is provided to the callback to fill the buffer pointer.

◆ QueueBufferUpload() [6/7]

template<typename ElementType >
void FRDGBuilder::QueueBufferUpload ( FRDGBufferRef  Buffer,
TArrayView< ElementType, int32 Container,
ERDGInitialDataFlags  InitialDataFlags = ERDGInitialDataFlags::None 
)
inline

◆ QueueBufferUpload() [7/7]

template<typename ElementType >
void FRDGBuilder::QueueBufferUpload ( FRDGBufferRef  Buffer,
TArrayView< ElementType, int32 Container,
FRDGBufferInitialDataFreeCallback &&  InitialDataFreeCallback 
)
inline

◆ QueueCommitReservedBuffer()

void FRDGBuilder::QueueCommitReservedBuffer ( FRDGBufferRef  Buffer,
uint64  CommitSizeInBytes 
)
inline

Queues a reserved buffer commit on first use of the buffer in the graph. The commit is applied at the start of the graph and synced at the pass when the resource is first used, or at the end of the graph if the resource is unused and external. A resource may only be assigned a commit size once.

◆ QueueTextureExtraction() [1/2]

void FRDGBuilder::QueueTextureExtraction ( FRDGTextureRef  Texture,
TRefCountPtr< IPooledRenderTarget > *  OutPooledTexturePtr,
ERDGResourceExtractionFlags  Flags = ERDGResourceExtractionFlags::None 
)
inline

Queues a pooled render target extraction to happen at the end of graph execution. For graph-created textures, this extends the lifetime of the GPU resource until execution, at which point the pointer is filled. If specified, the texture is transitioned to the AccessFinal state, or kDefaultAccessFinal otherwise.

◆ QueueTextureExtraction() [2/2]

void FRDGBuilder::QueueTextureExtraction ( FRDGTextureRef  Texture,
TRefCountPtr< IPooledRenderTarget > *  OutPooledTexturePtr,
ERHIAccess  AccessFinal,
ERDGResourceExtractionFlags  Flags = ERDGResourceExtractionFlags::None 
)
inline

◆ RegisterExternalBuffer() [1/3]

FRDGBufferRef FRDGBuilder::RegisterExternalBuffer ( const TRefCountPtr< FRDGPooledBuffer > &  ExternalPooledBuffer,
const TCHAR NameIfNotRegistered,
ERDGBufferFlags  Flags = ERDGBufferFlags::None 
)

Register an external buffer with a custom name. The name is only used if the buffer has not already been registered.

◆ RegisterExternalBuffer() [2/3]

RENDERCORE_API FRDGBufferRef FRDGBuilder::RegisterExternalBuffer ( const TRefCountPtr< FRDGPooledBuffer > &  ExternalPooledBuffer,
ERDGBufferFlags  Flags,
ERHIAccess  AccessFinal 
)

◆ RegisterExternalBuffer() [3/3]

FRDGBufferRef FRDGBuilder::RegisterExternalBuffer ( const TRefCountPtr< FRDGPooledBuffer > &  ExternalPooledBuffer,
ERDGBufferFlags  Flags = ERDGBufferFlags::None 
)

Register a external buffer to be tracked by the render graph.

◆ RegisterExternalTexture() [1/2]

FRDGTexture * FRDGBuilder::RegisterExternalTexture ( const TRefCountPtr< IPooledRenderTarget > &  ExternalPooledTexture,
const TCHAR NameIfNotRegistered,
ERDGTextureFlags  Flags = ERDGTextureFlags::None 
)

Register an external texture with a custom name. The name is only used if the texture has not already been registered.

◆ RegisterExternalTexture() [2/2]

FRDGTextureRef FRDGBuilder::RegisterExternalTexture ( const TRefCountPtr< IPooledRenderTarget > &  ExternalPooledTexture,
ERDGTextureFlags  Flags = ERDGTextureFlags::None 
)

Registers a external pooled render target texture to be tracked by the render graph. The name of the registered RDG texture is pulled from the pooled render target.

◆ RemoveUnusedBufferWarning()

void FRDGBuilder::RemoveUnusedBufferWarning ( FRDGBufferRef  Buffer)
inline

◆ RemoveUnusedTextureWarning()

void FRDGBuilder::RemoveUnusedTextureWarning ( FRDGTextureRef  Texture)
inline

◆ SetBufferAccessFinal()

void FRDGBuilder::SetBufferAccessFinal ( FRDGBufferRef  Buffer,
ERHIAccess  Access 
)
inline

(External | Extracted only) Sets the access to transition to after execution at the end of the graph. Overwrites any previously set final access.

◆ SetCommandListStat()

void FRDGBuilder::SetCommandListStat ( TStatId  StatId)
inline

Sets the current command list stat for all subsequent passes.

◆ SetFlushResourcesRHI()

void FRDGBuilder::SetFlushResourcesRHI ( )

Tells the builder to delete unused RHI resources. The behavior of this method depends on whether RDG immediate mode is enabled: Deferred: RHI resource flushes are performed prior to execution. Immediate: RHI resource flushes are performed immediately.

◆ SetPassWorkload()

void FRDGBuilder::SetPassWorkload ( FRDGPass Pass,
uint32  Workload 
)
inline

Sets the expected workload of the pass execution lambda. The default workload is 1 and is more or less the 'average cost' of a pass. Recommended usage is to set a workload equal to the number of complex draw / dispatch calls (each with its own parameters, etc), and only as a performance tweak if a particular pass is very expensive relative to other passes.

◆ SetTextureAccessFinal()

void FRDGBuilder::SetTextureAccessFinal ( FRDGTextureRef  Texture,
ERHIAccess  Access 
)
inline

(External | Extracted only) Sets the access to transition to after execution at the end of the graph. Overwrites any previously set final access.

◆ SkipInitialAsyncComputeFence()

void FRDGBuilder::SkipInitialAsyncComputeFence ( )
inline

Tells the RDG Builder that it is safe not to issue a fence from Async Compute -> Graphics at the start of the graph. By default RDG will issue the fence to keep new work from overlapping with work from prior builders.

◆ TickPoolElements()

void FRDGBuilder::TickPoolElements ( )
static

Per-frame update of the render graph resource pool.

◆ UseExternalAccessMode() [1/2]

void FRDGBuilder::UseExternalAccessMode ( FRDGViewableResource Resource,
ERHIAccess  ReadOnlyAccess,
ERHIPipeline  Pipelines = ERHIPipeline::Graphics 
)

Configures the resource for external access for all subsequent passes, or until UseInternalAccessMode is called. Only read-only access states are allowed. When in external access mode, it is safe to access the underlying RHI resource directly in later RDG passes. This method is only allowed for registered or externally converted resources. The method effectively guarantees that RDG will transition the resource into the desired state for all subsequent passes so long as the resource remains externally accessible.

◆ UseExternalAccessMode() [2/2]

void FRDGBuilder::UseExternalAccessMode ( TArrayView< FRDGViewableResource *const >  Resources,
ERHIAccess  ReadOnlyAccess,
ERHIPipeline  Pipelines = ERHIPipeline::Graphics 
)
inline

◆ UseInternalAccessMode() [1/2]

void FRDGBuilder::UseInternalAccessMode ( FRDGViewableResource Resource)

Use this method to resume tracking of a resource after calling UseExternalAccessMode. It is safe to call this method even if external access mode was not enabled (it will simply no-op). It is not valid to access the underlying RHI resource in any pass added after calling this method.

◆ UseInternalAccessMode() [2/2]

void FRDGBuilder::UseInternalAccessMode ( TArrayView< FRDGViewableResource *const >  Resources)
inline

◆ WaitForAsyncDeleteTask()

void FRDGBuilder::WaitForAsyncDeleteTask ( )
static

Waits for the last RDG async delete task that was launched. If the event is valid it is consumed. Thus, it is not thread safe to wait from multiple threads at once.

◆ WaitForAsyncExecuteTask()

void FRDGBuilder::WaitForAsyncExecuteTask ( )
static

Waits for the last RDG chained execution task that was launched.

Member Data Documentation

◆ bEnabled

bool FRDGBuilder::bEnabled = false

◆ Blackboard

FRDGBlackboard FRDGBuilder::Blackboard

The blackboard used to hold common data tied to the graph lifetime.

◆ TaskPriorityBias

int8 FRDGBuilder::TaskPriorityBias = 0

◆ Tasks

Array of all tasks for variants of AddSetupTask.


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