HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HgiComputeCmds Class Referenceabstract

#include <computeCmds.h>

+ Inheritance diagram for HgiComputeCmds:

Public Member Functions

HGI_API ~HgiComputeCmds () override
 
virtual HGI_API void PushDebugGroup (const char *label)=0
 Push a debug marker. More...
 
virtual HGI_API void PopDebugGroup ()=0
 Pop the last debug marker. More...
 
virtual HGI_API void BindPipeline (HgiComputePipelineHandle pipeline)=0
 
virtual HGI_API void BindResources (HgiResourceBindingsHandle resources)=0
 
virtual HGI_API void SetConstantValues (HgiComputePipelineHandle pipeline, uint32_t bindIndex, uint32_t byteSize, const void *data)=0
 
virtual HGI_API void Dispatch (int dimX, int dimY)=0
 
- Public Member Functions inherited from HgiCmds
virtual HGI_API ~HgiCmds ()
 

Protected Member Functions

HGI_API HgiComputeCmds ()
 
- Protected Member Functions inherited from HgiCmds
HGI_API HgiCmds ()
 
virtual HGI_API bool _Submit (Hgi *hgi)
 

Detailed Description

A graphics API independent abstraction of compute commands. HgiComputeCmds is a lightweight object that cannot be re-used after it has been submitted. A new cmds object should be acquired for each frame.

Definition at line 45 of file computeCmds.h.

Constructor & Destructor Documentation

HGI_API HgiComputeCmds::~HgiComputeCmds ( )
override
HGI_API HgiComputeCmds::HgiComputeCmds ( )
protected

Member Function Documentation

virtual HGI_API void HgiComputeCmds::BindPipeline ( HgiComputePipelineHandle  pipeline)
pure virtual

Bind a pipeline state object. Usually you call this right after calling CreateGraphicsCmds to set the graphics pipeline state. The resource bindings used when creating the pipeline must be compatible with the resources bound via BindResources().

Implemented in HgiGLComputeCmds.

virtual HGI_API void HgiComputeCmds::BindResources ( HgiResourceBindingsHandle  resources)
pure virtual

Bind resources such as textures and uniform buffers. Usually you call this right after BindPipeline() and the resources bound must be compatible with the bound pipeline.

Implemented in HgiGLComputeCmds.

virtual HGI_API void HgiComputeCmds::Dispatch ( int  dimX,
int  dimY 
)
pure virtual

Execute a compute shader with provided thread group count in each dimension.

Implemented in HgiGLComputeCmds.

virtual HGI_API void HgiComputeCmds::PopDebugGroup ( )
pure virtual

Pop the last debug marker.

Implemented in HgiGLComputeCmds.

virtual HGI_API void HgiComputeCmds::PushDebugGroup ( const char *  label)
pure virtual

Push a debug marker.

Implemented in HgiGLComputeCmds.

virtual HGI_API void HgiComputeCmds::SetConstantValues ( HgiComputePipelineHandle  pipeline,
uint32_t  bindIndex,
uint32_t  byteSize,
const void data 
)
pure virtual

Set Push / Function constants. pipeline is the compute pipeline that you are binding before the draw call. It contains the program used for the uniform buffer constant values for. bindIndex is the binding point index in the pipeline's shader to bind the data to. byteSize is the size of the data you are updating. data is the data you are copying into the push constants block.

Implemented in HgiGLComputeCmds.


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