HDK
|
#include <indirectCommandEncoder.h>
Public Member Functions | |
HGI_API | ~HgiIndirectCommandEncoder () override |
virtual HGI_API HgiIndirectCommandsUniquePtr | EncodeDraw (HgiComputeCmds *computeCmds, HgiGraphicsPipelineHandle const &pipeline, HgiResourceBindingsHandle const &resourceBindings, HgiVertexBufferBindingVector const &vertexBindings, HgiBufferHandle const &drawParameterBuffer, uint32_t drawBufferByteOffset, uint32_t drawCount, uint32_t stride)=0 |
virtual HGI_API HgiIndirectCommandsUniquePtr | EncodeDrawIndexed (HgiComputeCmds *computeCmds, HgiGraphicsPipelineHandle const &pipeline, HgiResourceBindingsHandle const &resourceBindings, HgiVertexBufferBindingVector const &vertexBindings, HgiBufferHandle const &indexBuffer, HgiBufferHandle const &drawParameterBuffer, uint32_t drawBufferByteOffset, uint32_t drawCount, uint32_t stride, uint32_t patchBaseVertexByteOffset)=0 |
virtual HGI_API void | ExecuteDraw (HgiGraphicsCmds *gfxCmds, HgiIndirectCommands const *commands)=0 |
![]() | |
virtual HGI_API | ~HgiCmds () |
HGI_API bool | IsSubmitted () const |
Returns true if the HgiCmds object has been submitted to GPU. More... | |
Protected Member Functions | |
HGI_API | HgiIndirectCommandEncoder () |
![]() | |
HGI_API | HgiCmds () |
virtual HGI_API bool | _Submit (Hgi *hgi, HgiSubmitWaitType wait) |
HGI_API void | _SetSubmitted () |
The indirect command encoder is used to record the drawing primitives for a batch and capture the resource bindings so that it can be executed efficently in a later stage of rendering. The EncodeDraw and EncodeDrawIndexed functions store all the necessary state in the HgiIndirectCommands structure. This is sub-classed based on the platform implementation to maintain all the custom state. Execute draw takes the HgiIndirectCommands structure and replays it on the device. Currently this is only implemented on the Metal HGI device.
Definition at line 73 of file indirectCommandEncoder.h.
|
override |
|
protected |
|
pure virtual |
Encodes a batch of draw commands from the drawParameterBuffer. Returns a HgiIndirectCommands which holds the necessary buffers and state for replaying the batch.
|
pure virtual |
Encodes a batch of indexed draw commands from the drawParameterBuffer. Returns a HgiIndirectCommands which holds the necessary buffers and state for replaying the batch.
|
pure virtual |
Excutes an indirect command batch from the HgiIndirectCommands structure.