Navigation
API > API/Runtime > API/Runtime/RenderCore
Inheritance Hierarchy
- FRDGAllocatorScope
- FRDGBuilder
References
| Module | RenderCore |
| Header | /Engine/Source/Runtime/RenderCore/Public/RenderGraphBuilder.h |
| Include | #include "RenderGraphBuilder.h" |
Syntax
class FRDGBuilder : private FRDGAllocatorScope
Remarks
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.
Variables
| Type | Name | Description | |
|---|---|---|---|
| FRDGBlackboard | Blackboard | The blackboard used to hold common data tied to the graph lifetime. | |
| FRHICommandListImmediate & | RHICmdList | The RHI command list used for the render graph. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FRDGBuilder
(
const FRDGBuilder& |
|||
FRDGBuilder
(
FRHICommandListImmediate& RHICmdList, |
Destructors
| Type | Name | Description | |
|---|---|---|---|
~FRDGBuilder () |
Functions
| Type | Name | Description | |
|---|---|---|---|
| UE::Tasks::FTask | AddCommandListSetupTask
(
TaskLambda&& Task, |
||
| UE::Tasks::FTask | AddCommandListSetupTask
(
TaskLambdaType&& TaskLambda, |
||
| UE::Tasks::FTask | AddCommandListSetupTask
(
TaskLambda&& Task, |
||
| UE::Tasks::FTask | AddCommandListSetupTask
(
TaskLambda&& Task, |
||
| UE::Tasks::FTask | AddCommandListSetupTask
(
TaskLambdaType&& TaskLambda, |
||
| UE::Tasks::FTask | AddCommandListSetupTask
(
TaskLambdaType&& TaskLambda, |
||
| UE::Tasks::FTask | AddCommandListSetupTask
(
TaskLambda&& Task, |
||
| UE::Tasks::FTask | AddCommandListSetupTask
(
TaskLambdaType&& TaskLambda, |
||
| UE::Tasks::FTask | AddCommandListSetupTask
(
TaskLambdaType&& TaskLambda, |
||
| UE::Tasks::FTask | AddCommandListSetupTask
(
TaskLambda&& Task, |
Launches a task that is synced prior to graph execution. | |
| void | A hint to the builder to flush work to the RHI thread after the last queued pass on the execution timeline. | ||
| FRDGPassRef | AddPass
(
FRDGEventName&& Name, |
Adds a lambda pass to the graph with an accompanied pass parameter struct. | |
| FRDGPassRef | AddPass
(
FRDGEventName&& Name, |
Adds a lambda pass to the graph without any parameters. | |
| FRDGPassRef | AddPass
(
FRDGEventName&& Name, |
Adds a lambda pass to the graph with a runtime-generated parameter struct. | |
| void | AddPassDependency
(
FRDGPass* Producer, |
Adds a user-defined dependency between two passes. | |
| UE::Tasks::FTask | AddSetupTask
(
TaskLambdaType&& TaskLambda, |
||
| UE::Tasks::FTask | AddSetupTask
(
TaskLambdaType&& TaskLambda, |
||
| UE::Tasks::FTask | AddSetupTask
(
TaskLambda&& Task, |
||
| UE::Tasks::FTask | AddSetupTask
(
TaskLambda&& Task, |
||
| UE::Tasks::FTask | AddSetupTask
(
TaskLambdaType&& TaskLambda, |
||
| UE::Tasks::FTask | AddSetupTask
(
TaskLambdaType&& TaskLambda, |
||
| UE::Tasks::FTask | AddSetupTask
(
TaskLambda&& Task, |
||
| UE::Tasks::FTask | AddSetupTask
(
TaskLambdaType&& TaskLambda, |
||
| UE::Tasks::FTask | AddSetupTask
(
TaskLambda&& Task, |
||
| UE::Tasks::FTask | AddSetupTask
(
TaskLambda&& Task, |
Launches a task that is synced prior to graph execution. | |
| void * | Alloc
(
uint64 SizeInBytes, |
Allocates raw memory using an allocator tied to the lifetime of the graph. | |
| TArray< ObjectType, SceneRenderingAllocator > & | AllocArray () |
Allocates a C++ array where both the array and the data are tied to the lifetime of the graph. | |
| ObjectType * | AllocObject
(
TArgs&&... Args |
Allocates a C++ object using an allocator tied to the lifetime of the graph. | |
| BaseParameterStructType * | AllocParameters
(
const FShaderParametersMetadata* ParametersMetadata |
Allocates a data-driven parameter struct with a lifetime tied to graph execution. | |
| ParameterStructType * | AllocParameters
(
ParameterStructType* StructToCopy |
Allocates a parameter struct with a lifetime tied to graph execution, and copies contents from an existing parameters struct. | |
| ParameterStructType * | Allocates a parameter struct with a lifetime tied to graph execution. | ||
| TStridedView< BaseParameterStructType > | AllocParameters
(
const FShaderParametersMetadata* ParametersMetadata, |
Allocates an array of data-driven parameter structs with a lifetime tied to graph execution. | |
| PODType * | AllocPOD () |
Allocates POD memory using an allocator tied to the lifetime of the graph. | |
| PODType * | AllocPODArray
(
uint32 Count |
Allocates POD memory using an allocator tied to the lifetime of the graph. | |
| void | BeginEventScope
(
FRDGEventName&& Name |
Manually begins a new GPU event scope. | |
| FString | BeginResourceDump
(
const TCHAR* Cmd |
||
| const TRefCountPtr< FRDGPooledBuffer > & | ConvertToExternalBuffer
(
FRDGBufferRef Buffer |
||
| const TRefCountPtr< IPooledRenderTarget > & | ConvertToExternalTexture
(
FRDGTextureRef Texture |
For graph-created resources, this forces immediate allocation of the underlying pooled resource, effectively promoting it to an external resource. | |
| FRHIUniformBuffer * | ConvertToExternalUniformBuffer
(
FRDGUniformBufferRef UniformBuffer |
For a graph-created uniform buffer, this forces immediate allocation of the underlying resource, effectively promoting it to an external resource. | |
| FRDGBufferRef | CreateBuffer
(
const FRDGBufferDesc& Desc, |
A variant of CreateBuffer where users supply NumElements through a callback. | |
| FRDGBufferRef | CreateBuffer
(
const FRDGBufferDesc& Desc, |
Create graph tracked buffer from a descriptor. | |
| FRDGBufferSRVRef | CreateSRV
(
FRDGBufferRef Buffer, |
||
| FRDGBufferSRVRef | CreateSRV
(
const FRDGBufferSRVDesc& Desc |
Create graph tracked SRV for a buffer from a descriptor. | |
| FRDGTextureSRVRef | CreateSRV
(
const FRDGTextureSRVDesc& Desc |
Create graph tracked SRV for a texture from a descriptor. | |
| FRDGTextureRef | CreateTexture
(
const FRDGTextureDesc& Desc, |
Create graph tracked texture from a descriptor. | |
| FRDGBufferUAVRef | CreateUAV
(
const FRDGBufferUAVDesc& Desc, |
Create graph tracked UAV for a buffer from a descriptor. | |
| FRDGTextureUAVRef | CreateUAV
(
const FRDGTextureUAVDesc& Desc, |
Create graph tracked UAV for a texture from a descriptor. | |
| FRDGTextureUAVRef | CreateUAV
(
FRDGTextureRef Texture, |
||
| FRDGBufferUAVRef | CreateUAV
(
FRDGBufferRef Buffer, |
||
| TRDGUniformBufferRef< ParameterStructType > | CreateUniformBuffer
(
const ParameterStructType* ParameterStruct |
Creates a graph tracked uniform buffer which can be attached to passes. | |
| void | DumpDraw
(
const FRDGEventName& DrawEventName |
||
| void | Manually ends the current GPU event scope. | ||
| void | |||
| void | Execute () |
Executes the queued passes, managing setting of render targets (RHI RenderPasses), resource transitions and queued texture extraction. | |
| FRDGBuffer * | FindExternalBuffer
(
FRDGPooledBuffer* ExternalPooledBuffer |
Finds an RDG buffer associated with the external buffer, or returns null if none is found. | |
| FRDGBuffer * | FindExternalBuffer
(
FRHIBuffer* Buffer |
Finds an RDG buffer associated with the external buffer, or returns null if none is found. | |
| FRDGTexture * | FindExternalTexture
(
FRHITexture* Texture |
Finds an RDG texture associated with the external texture, or returns null if none is found. | |
| FRDGTexture * | FindExternalTexture
(
IPooledRenderTarget* ExternalPooledTexture |
Finds an RDG texture associated with the external texture, or returns null if none is found. | |
| void | Flushes all queued passes to an async task to perform setup work. | ||
| const TRefCountPtr< FRDGPooledBuffer > & | GetPooledBuffer
(
FRDGBufferRef Buffer |
||
| const TRefCountPtr< IPooledRenderTarget > & | GetPooledTexture
(
FRDGTextureRef Texture |
Performs an immediate query for the underlying pooled resource. | |
| void | |||
| bool | |||
| bool | |||
| bool | Whether RDG is running in immediate mode. | ||
| void | QueueBufferExtraction
(
FRDGBufferRef Buffer, |
Queues a pooled buffer extraction to happen at the end of graph execution. | |
| void | QueueBufferExtraction
(
FRDGBufferRef Buffer, |
Queues a pooled buffer extraction to happen at the end of graph execution. | |
| void | QueueBufferUpload
(
FRDGBufferRef Buffer, |
Queues a buffer upload operation prior to execution. | |
| void | QueueBufferUpload
(
FRDGBufferRef Buffer, |
||
| void | QueueBufferUpload
(
FRDGBufferRef Buffer, |
A variant where InitialData and InitialDataSize are supplied through callbacks. | |
| void | QueueBufferUpload
(
FRDGBufferRef Buffer, |
Queues a buffer upload operation prior to execution. | |
| void | QueueBufferUpload
(
FRDGBufferRef Buffer, |
||
| void | QueueBufferUpload
(
FRDGBufferRef Buffer, |
Queues a buffer upload operation prior to execution. | |
| void | QueueTextureExtraction
(
FRDGTextureRef Texture, |
Queues a pooled render target extraction to happen at the end of graph execution. | |
| void | QueueTextureExtraction
(
FRDGTextureRef Texture, |
Queues a pooled render target extraction to happen at the end of graph execution. | |
| FRDGBufferRef | RegisterExternalBuffer
(
const TRefCountPtr< FRDGPooledBuffer >& ExternalPooledBuffer, |
Register a external buffer to be tracked by the render graph. | |
| FRDGBufferRef | RegisterExternalBuffer
(
const TRefCountPtr< FRDGPooledBuffer >& ExternalPooledBuffer, |
Register a external buffer to be tracked by the render graph. | |
| FRDGBufferRef | RegisterExternalBuffer
(
const TRefCountPtr< FRDGPooledBuffer >& ExternalPooledBuffer, |
Register an external buffer with a custom name. | |
| FRDGTextureRef | RegisterExternalTexture
(
const TRefCountPtr< IPooledRenderTarget >& ExternalPooledTexture, |
Registers a external pooled render target texture to be tracked by the render graph. | |
| FRDGTextureRef | RegisterExternalTexture
(
const TRefCountPtr< IPooledRenderTarget >& ExternalPooledTexture, |
Register an external texture with a custom name. | |
| void | RemoveUnusedBufferWarning
(
FRDGBufferRef Buffer |
||
| void | RemoveUnusedTextureWarning
(
FRDGTextureRef Texture |
Flag a resource that is produced by a pass but never used or extracted to not emit an 'unused' warning. | |
| void | SetBufferAccessFinal
(
FRDGBufferRef Buffer, |
(External | Extracted only) Sets the access to transition to after execution at the end of the graph. | |
| void | SetCommandListStat
(
TStatId StatId |
Sets the current command list stat for all subsequent passes. | |
| void | Tells the builder to delete unused RHI resources. | ||
| void | SetPassWorkload
(
FRDGPass* Pass, |
Sets the expected workload of the pass execution lambda. | |
| void | SetTextureAccessFinal
(
FRDGTextureRef Texture, |
(External | Extracted only) Sets the access to transition to after execution at the end of the graph. | |
| void | Per-frame update of the render graph resource pool. | ||
| void | UseExternalAccessMode
(
FRDGViewableResource* Resource, |
Configures the resource for external access for all subsequent passes, or until UseInternalAccessMode is called. | |
| void | UseExternalAccessMode
(
TArrayView< FRDGViewableResource*const > Resources, |
||
| void | UseInternalAccessMode
(
FRDGViewableResource* Resource |
Use this method to resume tracking of a resource after calling UseExternalAccessMode. | |
| void | UseInternalAccessMode
(
TArrayView< FRDGViewableResource*const > Resources |
Constants
| Name | Description |
|---|---|
| kDefaultUnaccountedCSVStat |