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

#include <MeshDrawCommands.h>

Public Member Functions

 FParallelMeshDrawCommandPass ()
 
 ~FParallelMeshDrawCommandPass ()
 
void DispatchPassSetup (FScene *Scene, const FViewInfo &View, FInstanceCullingContext &&InstanceCullingContext, EMeshPass::Type PassType, FExclusiveDepthStencil::Type BasePassDepthStencilAccess, FMeshPassProcessor *MeshPassProcessor, const TArray< FMeshBatchAndRelevance, SceneRenderingAllocator > &DynamicMeshElements, const TArray< FMeshPassMask, SceneRenderingAllocator > *DynamicMeshElementsPassRelevance, int32 NumDynamicMeshElements, TArray< const FStaticMeshBatch *, SceneRenderingAllocator > &InOutDynamicMeshCommandBuildRequests, TArray< EMeshDrawCommandCullingPayloadFlags, SceneRenderingAllocator > InOutDynamicMeshCommandBuildFlags, int32 NumDynamicMeshCommandBuildRequestElements, FMeshCommandOneFrameArray &InOutMeshDrawCommands, FMeshPassProcessor *MobileBasePassCSMMeshPassProcessor=nullptr, FMeshCommandOneFrameArray *InOutMobileBasePassCSMMeshDrawCommands=nullptr)
 
void BuildRenderingCommands (FRDGBuilder &GraphBuilder, const FGPUScene &GPUScene, FInstanceCullingDrawParams &OutInstanceCullingDrawParams)
 
void WaitForSetupTask ()
 
void Draw (FRHICommandList &RHICmdList, const FInstanceCullingDrawParams *InstanceCullingDrawParams=nullptr) const
 
void Dispatch (FRDGDispatchPassBuilder &DispatchPassBuilder, const FInstanceCullingDrawParams *InstanceCullingDrawParams=nullptr, float ViewportScale=1.0f) const
 
void Dispatch (FRDGDispatchPassBuilder &DispatchPassBuilder, const FInstanceCullingDrawParams *InstanceCullingDrawParams, TFunctionRef< void(FRHICommandList &)> SetupCommandListFunction) const
 
PRAGMA_DISABLE_DEPRECATION_WARNINGS void DispatchDraw (FParallelCommandListSet *ParallelCommandListSet, FRHICommandList &RHICmdList, const FInstanceCullingDrawParams *InstanceCullingDrawParams=nullptr) const
 
PRAGMA_ENABLE_DEPRECATION_WARNINGS void Cleanup ()
 
void SetDumpInstancingStats (const FString &InPassName)
 
bool HasAnyDraw () const
 
FInstanceCullingContextGetInstanceCullingContext ()
 
const FGraphEventRefGetTaskEvent () const
 
FGraphEventRef && AcquireTaskEvent ()
 
const FMeshCommandOneFrameArrayGetMeshDrawCommands () const
 

Static Public Member Functions

static bool IsOnDemandShaderCreationEnabled ()
 

Detailed Description

Parallel mesh draw command processing and rendering. Encapsulates two parallel tasks - mesh command setup task and drawing task.

Constructor & Destructor Documentation

◆ FParallelMeshDrawCommandPass()

FParallelMeshDrawCommandPass::FParallelMeshDrawCommandPass ( )
inline

◆ ~FParallelMeshDrawCommandPass()

FParallelMeshDrawCommandPass::~FParallelMeshDrawCommandPass ( )

Member Function Documentation

◆ AcquireTaskEvent()

FGraphEventRef && FParallelMeshDrawCommandPass::AcquireTaskEvent ( )
inline

◆ BuildRenderingCommands()

void FParallelMeshDrawCommandPass::BuildRenderingCommands ( FRDGBuilder GraphBuilder,
const FGPUScene GPUScene,
FInstanceCullingDrawParams OutInstanceCullingDrawParams 
)

Sync with setup task and run post-instance culling job to create the render commands and instance ID lists and optionally vertex instance data. Needs to happen after DispatchPassSetup and before DispatchDraw, but not before global instance culling has been done.

◆ Cleanup()

void FParallelMeshDrawCommandPass::Cleanup ( )

◆ Dispatch() [1/2]

void FParallelMeshDrawCommandPass::Dispatch ( FRDGDispatchPassBuilder DispatchPassBuilder,
const FInstanceCullingDrawParams InstanceCullingDrawParams,
TFunctionRef< void(FRHICommandList &)>  SetupCommandListFunction 
) const

◆ Dispatch() [2/2]

void FParallelMeshDrawCommandPass::Dispatch ( FRDGDispatchPassBuilder DispatchPassBuilder,
const FInstanceCullingDrawParams InstanceCullingDrawParams = nullptr,
float  ViewportScale = 1.0f 
) const

◆ DispatchDraw()

PRAGMA_DISABLE_DEPRECATION_WARNINGS void FParallelMeshDrawCommandPass::DispatchDraw ( FParallelCommandListSet ParallelCommandListSet,
FRHICommandList RHICmdList,
const FInstanceCullingDrawParams InstanceCullingDrawParams = nullptr 
) const

◆ DispatchPassSetup()

void FParallelMeshDrawCommandPass::DispatchPassSetup ( FScene Scene,
const FViewInfo View,
FInstanceCullingContext &&  InstanceCullingContext,
EMeshPass::Type  PassType,
FExclusiveDepthStencil::Type  BasePassDepthStencilAccess,
FMeshPassProcessor MeshPassProcessor,
const TArray< FMeshBatchAndRelevance, SceneRenderingAllocator > &  DynamicMeshElements,
const TArray< FMeshPassMask, SceneRenderingAllocator > *  DynamicMeshElementsPassRelevance,
int32  NumDynamicMeshElements,
TArray< const FStaticMeshBatch *, SceneRenderingAllocator > &  InOutDynamicMeshCommandBuildRequests,
TArray< EMeshDrawCommandCullingPayloadFlags, SceneRenderingAllocator InOutDynamicMeshCommandBuildFlags,
int32  NumDynamicMeshCommandBuildRequestElements,
FMeshCommandOneFrameArray InOutMeshDrawCommands,
FMeshPassProcessor MobileBasePassCSMMeshPassProcessor = nullptr,
FMeshCommandOneFrameArray InOutMobileBasePassCSMMeshDrawCommands = nullptr 
)

Dispatch visible mesh draw command process task, which prepares this pass for drawing. This includes generation of dynamic mesh draw commands, draw sorting and draw merging.

◆ Draw()

PRAGMA_ENABLE_DEPRECATION_WARNINGS void FParallelMeshDrawCommandPass::Draw ( FRHICommandList RHICmdList,
const FInstanceCullingDrawParams InstanceCullingDrawParams = nullptr 
) const

Dispatch visible mesh draw command draw task.

◆ GetInstanceCullingContext()

FInstanceCullingContext * FParallelMeshDrawCommandPass::GetInstanceCullingContext ( )
inline

◆ GetMeshDrawCommands()

const FMeshCommandOneFrameArray & FParallelMeshDrawCommandPass::GetMeshDrawCommands ( ) const
inline

◆ GetTaskEvent()

const FGraphEventRef & FParallelMeshDrawCommandPass::GetTaskEvent ( ) const
inline

◆ HasAnyDraw()

bool FParallelMeshDrawCommandPass::HasAnyDraw ( ) const
inline

◆ IsOnDemandShaderCreationEnabled()

bool FParallelMeshDrawCommandPass::IsOnDemandShaderCreationEnabled ( )
static

◆ SetDumpInstancingStats()

void FParallelMeshDrawCommandPass::SetDumpInstancingStats ( const FString &  InPassName)

◆ WaitForSetupTask()

void FParallelMeshDrawCommandPass::WaitForSetupTask ( )

Sync with setup task.


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