24#ifndef PXR_IMAGING_HGI_INDIRECT_COMMAND_ENCODER_H
25#define PXR_IMAGING_HGI_INDIRECT_COMMAND_ENCODER_H
28#include "pxr/imaging/hgi/api.h"
29#include "pxr/imaging/hgi/cmds.h"
30#include "pxr/imaging/hgi/resourceBindings.h"
31#include "pxr/imaging/hgi/graphicsPipeline.h"
36PXR_NAMESPACE_OPEN_SCOPE
42struct HgiIndirectCommands
44 HgiIndirectCommands(uint32_t drawCount,
47 : drawCount(drawCount)
48 , graphicsPipeline(graphicsPipeline)
49 , resourceBindings(resourceBindings)
53 virtual ~HgiIndirectCommands() =
default;
60using HgiIndirectCommandsUniquePtr = std::unique_ptr<HgiIndirectCommands>;
87 HgiVertexBufferBindingVector
const& vertexBindings,
89 uint32_t drawBufferByteOffset,
101 HgiVertexBufferBindingVector
const& vertexBindings,
104 uint32_t drawBufferByteOffset,
107 uint32_t patchBaseVertexByteOffset) = 0;
114 HgiIndirectCommands
const* commands) = 0;
125PXR_NAMESPACE_CLOSE_SCOPE
Graphics commands are recorded in 'cmds' objects which are later submitted to hgi.
A graphics API independent abstraction of compute commands.
A graphics API independent abstraction of graphics commands.
Hydra Graphics Interface.
The indirect command encoder is used to record the drawing primitives for a batch and capture the res...
virtual HGI_API void ExecuteDraw(HgiGraphicsCmds *gfxCmds, HgiIndirectCommands const *commands)=0
Excutes an indirect command batch from the HgiIndirectCommands structure.
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
Encodes a batch of indexed draw commands from the drawParameterBuffer.
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
Encodes a batch of draw commands from the drawParameterBuffer.