![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <MeshPassProcessor.h>
Friends | |
| FORCENOINLINE friend uint32 | GetTypeHash (const FMeshDrawCommand &Other) |
FMeshDrawCommand fully describes a mesh pass draw call, captured just above the RHI.
FMeshDrawCommand should contain only data needed to draw. For InitViews payloads, use FVisibleMeshDrawCommand. FMeshDrawCommands are cached at Primitive AddToScene time for vertex factories that support it (no per-frame or per-view shader binding changes). Dynamic Instancing operates at the FMeshDrawCommand level for robustness.
Adding per-command shader bindings will reduce the efficiency of Dynamic Instancing, but rendering will always be correct. Any resources referenced by a command must be kept alive for the lifetime of the command. FMeshDrawCommand is not responsible for lifetime management of resources. For uniform buffers referenced by cached FMeshDrawCommand's, RHIUpdateUniformBuffer makes it possible to access per-frame data in the shader without changing bindings.
|
inline |
|
default |
|
default |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| uint64 FMeshDrawCommand::GetPipelineStateSortingKey | ( | const FGraphicsPipelineRenderTargetsInfo & | RenderTargetsInfo | ) | const |
Returns the pipeline state sort key, which can be used for sorting material draws to reduce context switches. This variant will not attempt to create a PSO if it doesn't exist yet and will just return the fallback.
| uint64 FMeshDrawCommand::GetPipelineStateSortingKey | ( | FRHICommandList & | RHICmdList, |
| const FGraphicsPipelineRenderTargetsInfo & | RenderTargetsInfo | ||
| ) | const |
Returns the pipeline state sort key, which can be used for sorting material draws to reduce context switches.
|
inline |
Allocates room for the shader bindings.
|
inline |
|
default |
|
default |
| RENDERER_API void FMeshDrawCommand::SetDebugData | ( | const FPrimitiveSceneProxy * | PrimitiveSceneProxy, |
| const FMaterial * | Material, | ||
| const FMaterialRenderProxy * | MaterialRenderProxy, | ||
| const FMeshProcessorShaders & | UntypedShaders, | ||
| const FVertexFactory * | VertexFactory, | ||
| const FMeshBatch & | MeshBatch, | ||
| int32 | PSOCollectorIndex | ||
| ) |
| void FMeshDrawCommand::SetDrawParametersAndFinalize | ( | const FMeshBatch & | MeshBatch, |
| int32 | BatchElementIndex, | ||
| FGraphicsMinimalPipelineStateId | PipelineId, | ||
| const FMeshProcessorShaders * | ShadersForDebugging | ||
| ) |
Called when the mesh draw command is complete.
|
inline |
|
static |
Submits commands to the RHI Commandlist to draw the MeshDrawCommand.
|
static |
Submits the state and shader bindings to the RHI command list, but does not invoke the draw.
If function returns false, then draw can be skipped because the PSO used by the draw command is not compiled yet (still precaching)
|
static |
Submits just the draw primitive portion of the draw command.
|
static |
Submits the state and shader bindings to the RHI command list, but does not invoke the draw indirect. If function returns false, then draw will be skipped because PSO used by the draw command is not compiled yet (still precaching)
|
static |
Submits just the draw indirect primitive portion of the draw command.
|
friend |
| union { ... } FMeshDrawCommand |
| uint32 FMeshDrawCommand::BaseVertexIndex |
| FRHIBuffer* FMeshDrawCommand::Buffer |
| FGraphicsMinimalPipelineStateId FMeshDrawCommand::CachedPipelineId |
PSO
| uint32 FMeshDrawCommand::FirstIndex |
Draw command parameters
| FRHIBuffer* FMeshDrawCommand::IndexBuffer |
| struct { ... } FMeshDrawCommand::IndirectArgs |
| uint32 FMeshDrawCommand::NumInstances |
| uint32 FMeshDrawCommand::NumPrimitives |
| uint32 FMeshDrawCommand::NumVertices |
| uint32 FMeshDrawCommand::Offset |
| int8 FMeshDrawCommand::PrimitiveIdStreamIndex |
| EPrimitiveType FMeshDrawCommand::PrimitiveType |
Redundant as already present in CachedPipelineId, but need access for dynamic instancing on GPU.
| FMeshDrawShaderBindings FMeshDrawCommand::ShaderBindings |
Resource bindings
| uint8 FMeshDrawCommand::StencilRef |
Non-pipeline state
| struct { ... } FMeshDrawCommand::VertexParams |
| FVertexInputStreamArray FMeshDrawCommand::VertexStreams |