FRDGBuilder

Builds the per-frame render graph.

Windows
MacOS
Linux

References

Module

RenderCore

Header

/Engine/Source/Runtime/RenderCore/Public/RenderGraphBuilder.h

Include

#include "RenderGraphBuilder.h"

Syntax

class FRDGBuilder

Remarks

Builds the per-frame render graph. Resources must be created from the builder before they can be bound to Pass ResourceTables. These resources are descriptors only until the graph is executed, where RHI resources are allocated as needed.

Variables

Name Description

Public variable

FMemStackBase &

 

MemStack

Memory stack use for allocating RDG resource and passes.

Public variable

FRHICommandList...

 

RHICmdList

The RHI command list used for the render graph.

Constructors

Name Description

Public function

FRDGBuilder

(
    FRHICommandListImmediate& InRHICmd...
)

A RHI cmd list is required, if using the immediate mode.

Public function

FRDGBuilder

(
    const FRDGBuilder&
)

Functions

Name Description

Public function

void

 

AddExternalPass

(
    FRDGPass* NewPass
)

Adds an externally created pass to the render graph.

Public function

void

 

AddPass

(
    FRDGEventName&& Name,
    ParameterStructType* Parameter...,
    ERDGPassFlags Flags,
    ExecuteLambdaType&& ExecuteLambda
)

Adds a hard coded lambda pass to the graph.

Public function

ParameterStr...

 

AllocParameters()

Allocates parameter struct specifically to survive through the life time of the render graph.

Public function

void

 

BeginEventScope

(
    FRDGEventName&& ScopeName
)

Begins / ends a named event scope.

Public function

void

 

BeginStatScope

(
    const FName& Name,
    const FName& StatName
)

Begins / ends a stat scope.

Public function

FRDGBufferRe...

 

CreateBuffer

(
    const FRDGBufferDesc& Desc,
    const TCHAR* Name,
    ERDGResourceFlags Flags
)

Create graph tracked resource from a descriptor with a debug name.

Public function

FRDGBufferSR...

 

CreateSRV

(
    FRDGBufferRef Buffer,
    EPixelFormat Format
)

Public function

FRDGBufferSR...

 

CreateSRV

(
    const FRDGBufferSRVDesc& Desc
)

Create graph tracked SRV for a buffer from a descriptor.

Public function

FRDGTextureS...

 

CreateSRV

(
    const FRDGTextureSRVDesc& Desc
)

Create graph tracked SRV for a texture from a descriptor.

Public function

FRDGTextureR...

 

CreateTexture

(
    const FPooledRenderTargetDesc& Des...,
    const TCHAR* Name,
    ERDGResourceFlags Flags
)

Create graph tracked resource from a descriptor with a debug name.

Public function

FRDGBufferUA...

 

CreateUAV

(
    FRDGBufferRef Buffer,
    EPixelFormat Format
)

Public function

FRDGBufferUA...

 

CreateUAV

(
    const FRDGBufferUAVDesc& Desc
)

Create graph tracked UAV for a buffer from a descriptor.

Public function

FRDGTextureU...

 

CreateUAV

(
    FRDGTextureRef Texture
)

Public function

FRDGTextureU...

 

CreateUAV

(
    const FRDGTextureUAVDesc& Desc
)

Create graph tracked UAV for a texture from a descriptor.

Public function

void

 

EndEventScope()

Public function

void

 

EndStatScope()

Public function

void

 

Execute()

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

Public function

void

 

QueueBufferExtraction

(
    FRDGBufferRef Buffer,
    TRefCountPtr< FPooledRDGBuffer >&#...,
    FRDGResourceState::EAccess Destinat...,
    FRDGResourceState::EPipeline Destin...
)

Queue a buffer extraction.

Public function

void

 

QueueTextureExtraction

(
    FRDGTextureRef Texture,
    TRefCountPtr< IPooledRenderTarget >...,
    bool bTransitionToRead
)

Queue a texture extraction.

Public function

FRDGBufferRe...

 

RegisterExternalBuffer

(
    const TRefCountPtr< FPooledRDGBuffe...,
    const TCHAR* Name,
    ERDGResourceFlags Flags
)

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

Public function

FRDGTextureR...

 

RegisterExternalTexture

(
    const TRefCountPtr< IPooledRenderTa...,
    const TCHAR* Name,
    ERDGResourceFlags Flags
)

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

Public function

void

 

RemoveUnusedBufferWarning

(
    FRDGBufferRef Buffer
)

Flag a buffer that is produced by a pass but never used or extracted to not emit an 'unused' warning.

Public function

void

 

RemoveUnusedTextureWarning

(
    FRDGTextureRef Texture
)

Flag a texture that is produced by a pass but never used or extracted to not emit an 'unused' warning.

Public function Static

void

 

TickPoolElements()

Per-frame update of the render graph resource pool.

Public function

FRDGBufferRe...

 

TryRegisterExternalBuffer

(
    const TRefCountPtr< FPooledRDGBuffe...,
    const TCHAR* Name,
    ERDGResourceFlags Flags
)

Variant of RegisterExternalBuffer which will return null (rather than assert) if the external buffer is null.

Public function

FRDGTextureR...

 

TryRegisterExternalTexture

(
    const TRefCountPtr< IPooledRenderTa...,
    const TCHAR* Name,
    ERDGResourceFlags Flags
)

Variant of RegisterExternalTexture which will returns null (rather than assert) if the external texture is null.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss