Navigation
API > API/Runtime > API/Runtime/Renderer
References
| Module | Renderer |
| Header | /Engine/Source/Runtime/Renderer/Public/MeshPassProcessor.h |
| Include | #include "MeshPassProcessor.h" |
Syntax
class FMeshDrawCommand
Remarks
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.
Variables
| Type | Name | Description | |
|---|---|---|---|
| union FMeshDrawCommand::@6086 | @6087 | ||
| uint32 | BaseVertexIndex | ||
| FRHIBuffer * | Buffer | ||
| FGraphicsMinimalPipelineStateId | CachedPipelineId | PSO | |
| uint32 | FirstIndex | Draw command parameters | |
| FRHIBuffer * | IndexBuffer | ||
| FMeshDrawCommand::@6086::@6089 | IndirectArgs | ||
| uint32 | NumInstances | ||
| uint32 | NumPrimitives | ||
| uint32 | NumVertices | ||
| uint32 | Offset | ||
| int8 | PrimitiveIdStreamIndex | ||
| EPrimitiveType: PT_NumBits | PrimitiveType | Redundant as already present in CachedPipelineId, but need access for dynamic instancing on GPU. | |
| FMeshDrawShaderBindings | ShaderBindings | Resource bindings | |
| uint8 | StencilRef | Non-pipeline state | |
| FMeshDrawCommand::@6086::@6088 | VertexParams | ||
| FVertexInputStreamArray | VertexStreams |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FMeshDrawCommand
(
FMeshDrawCommand&& Other |
|||
FMeshDrawCommand
(
const FMeshDrawCommand& Other |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | |||
| void | Finalize
(
FGraphicsMinimalPipelineStateId PipelineId, |
||
| SIZE_T | |||
| SIZE_T | |||
| uint32 | |||
| uint64 | GetPipelineStateSortingKey
(
FRHICommandList& RHICmdList, |
Returns the pipeline state sort key, which can be used for sorting material draws to reduce context switches. | |
| uint64 | GetPipelineStateSortingKey
(
const FGraphicsPipelineRenderTargetsInfo& RenderTargetsInfo |
Returns the pipeline state sort key, which can be used for sorting material draws to reduce context switches. | |
| void | InitializeShaderBindings
(
const FMeshProcessorShaders& Shaders |
Allocates room for the shader bindings. | |
| bool | MatchesForDynamicInstancing
(
const FMeshDrawCommand& Rhs |
||
| void | SetDebugData
(
const FPrimitiveSceneProxy* PrimitiveSceneProxy, |
||
| void | SetDrawParametersAndFinalize
(
const FMeshBatch& MeshBatch, |
Called when the mesh draw command is complete. | |
| void | SetStencilRef
(
uint32 InStencilRef |
||
| void | SubmitDraw
(
const FMeshDrawCommand&__restrict MeshDrawCommand, |
Submits commands to the RHI Commandlist to draw the MeshDrawCommand. | |
| bool | SubmitDrawBegin
(
const FMeshDrawCommand&__restrict MeshDrawCommand, |
Submits the state and shader bindings to the RHI command list, but does not invoke the draw. | |
| void | SubmitDrawEnd
(
const FMeshDrawCommand& MeshDrawCommand, |
Submits just the draw primitive portion of the draw command. | |
| bool | SubmitDrawIndirectBegin
(
const FMeshDrawCommand&__restrict MeshDrawCommand, |
Submits the state and shader bindings to the RHI command list, but does not invoke the draw indirect. | |
| void | SubmitDrawIndirectEnd
(
const FMeshDrawCommand& MeshDrawCommand, |
Submits just the draw indirect primitive portion of the draw command. |
Operators
| Type | Name | Description | |
|---|---|---|---|
| FMeshDrawCommand & | operator=
(
FMeshDrawCommand&& Other |
||
| FMeshDrawCommand & | operator=
(
const FMeshDrawCommand& Other |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FMeshDrawEvent |