HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HgiGLOps Class Reference

#include <ops.h>

Static Public Member Functions

static HGIGL_API HgiGLOpsFn PushDebugGroup (const char *label)
 
static HGIGL_API HgiGLOpsFn PopDebugGroup ()
 
static HGIGL_API HgiGLOpsFn CopyTextureGpuToCpu (HgiTextureGpuToCpuOp const &copyOp)
 
static HGIGL_API HgiGLOpsFn CopyTextureCpuToGpu (HgiTextureCpuToGpuOp const &copyOp)
 
static HGIGL_API HgiGLOpsFn CopyBufferGpuToGpu (HgiBufferGpuToGpuOp const &copyOp)
 
static HGIGL_API HgiGLOpsFn CopyBufferCpuToGpu (HgiBufferCpuToGpuOp const &copyOp)
 
static HGIGL_API HgiGLOpsFn CopyBufferGpuToCpu (HgiBufferGpuToCpuOp const &copyOp)
 
static HGIGL_API HgiGLOpsFn CopyTextureToBuffer (HgiTextureToBufferOp const &copyOp)
 
static HGIGL_API HgiGLOpsFn CopyBufferToTexture (HgiBufferToTextureOp const &copyOp)
 
static HGIGL_API HgiGLOpsFn ResolveFramebuffer (HgiGLDevice *device, HgiGraphicsCmdsDesc const &graphicsCmds)
 
static HGIGL_API HgiGLOpsFn SetViewport (GfVec4i const &vp)
 
static HGIGL_API HgiGLOpsFn SetScissor (GfVec4i const &sc)
 
static HGIGL_API HgiGLOpsFn BindPipeline (HgiGraphicsPipelineHandle pipeline)
 
static HGIGL_API HgiGLOpsFn BindPipeline (HgiComputePipelineHandle pipeline)
 
static HGIGL_API HgiGLOpsFn BindResources (HgiResourceBindingsHandle resources)
 
static HGIGL_API HgiGLOpsFn SetConstantValues (HgiGraphicsPipelineHandle pipeline, HgiShaderStage stages, uint32_t bindIndex, uint32_t byteSize, const void *data)
 
static HGIGL_API HgiGLOpsFn SetConstantValues (HgiComputePipelineHandle pipeline, uint32_t bindIndex, uint32_t byteSize, const void *data)
 
static HGIGL_API HgiGLOpsFn BindVertexBuffers (HgiVertexBufferBindingVector const &bindings)
 
static HGIGL_API HgiGLOpsFn Draw (HgiPrimitiveType primitiveType, uint32_t primitiveIndexSize, uint32_t vertexCount, uint32_t baseVertex, uint32_t instanceCount, uint32_t baseInstance)
 
static HGIGL_API HgiGLOpsFn DrawIndirect (HgiPrimitiveType primitiveType, uint32_t primitiveIndexSize, HgiBufferHandle const &drawParameterBuffer, uint32_t drawBufferByteOffset, uint32_t drawCount, uint32_t stride)
 
static HGIGL_API HgiGLOpsFn DrawIndexed (HgiPrimitiveType primitiveType, uint32_t primitiveIndexSize, HgiBufferHandle const &indexBuffer, uint32_t indexCount, uint32_t indexBufferByteOffset, uint32_t baseVertex, uint32_t instanceCount, uint32_t baseInstance)
 
static HGIGL_API HgiGLOpsFn DrawIndexedIndirect (HgiPrimitiveType primitiveType, uint32_t primitiveIndexSize, HgiBufferHandle const &indexBuffer, HgiBufferHandle const &drawParameterBuffer, uint32_t drawBufferByteOffset, uint32_t drawCount, uint32_t stride)
 
static HGIGL_API HgiGLOpsFn BindFramebufferOp (HgiGLDevice *device, HgiGraphicsCmdsDesc const &desc)
 
static HGIGL_API HgiGLOpsFn Dispatch (int dimX, int dimY)
 
static HGIGL_API HgiGLOpsFn FillBuffer (HgiBufferHandle const &buffer, uint8_t value)
 
static HGIGL_API HgiGLOpsFn GenerateMipMaps (HgiTextureHandle const &texture)
 
static HGIGL_API HgiGLOpsFn InsertMemoryBarrier (HgiMemoryBarrier barrier)
 

Detailed Description

A collection of functions used by cmds objects to do deferred cmd recording. Modern API's support command buffer recording of gfx commands ('deferred'). Meaning: No commands are executed on the GPU until we Submit the cmd buffer.

OpenGL uses 'immediate' mode instead where gfx commands are immediately processed and given to the GPU at a time of the drivers choosing. We use 'Ops' functions to record our OpenGL function in a list and only execute them in OpenGL during the SubmitCmds phase.

This has two benefits:

  1. OpenGL behaves more like Metal and Vulkan. So when clients write Hgi code they get similar behavior in gpu command execution across all backends. For example, if you are running with HgiGL and recording commands into a Hgi***Cmds object and forget to call 'SubmitCmds' you will notice that your commands are not executed on the GPU, just like what would happen if you were running with HgiMetal.
  2. It lets us satisfy the Hgi requirement that Hgi***Cmds objects must be able to do their recording on secondary threads.

Definition at line 70 of file ops.h.

Member Function Documentation

static HGIGL_API HgiGLOpsFn HgiGLOps::BindFramebufferOp ( HgiGLDevice device,
HgiGraphicsCmdsDesc const &  desc 
)
static
static HGIGL_API HgiGLOpsFn HgiGLOps::BindPipeline ( HgiGraphicsPipelineHandle  pipeline)
static
static HGIGL_API HgiGLOpsFn HgiGLOps::BindPipeline ( HgiComputePipelineHandle  pipeline)
static
static HGIGL_API HgiGLOpsFn HgiGLOps::BindResources ( HgiResourceBindingsHandle  resources)
static
static HGIGL_API HgiGLOpsFn HgiGLOps::BindVertexBuffers ( HgiVertexBufferBindingVector const &  bindings)
static
static HGIGL_API HgiGLOpsFn HgiGLOps::CopyBufferCpuToGpu ( HgiBufferCpuToGpuOp const &  copyOp)
static
static HGIGL_API HgiGLOpsFn HgiGLOps::CopyBufferGpuToCpu ( HgiBufferGpuToCpuOp const &  copyOp)
static
static HGIGL_API HgiGLOpsFn HgiGLOps::CopyBufferGpuToGpu ( HgiBufferGpuToGpuOp const &  copyOp)
static
static HGIGL_API HgiGLOpsFn HgiGLOps::CopyBufferToTexture ( HgiBufferToTextureOp const &  copyOp)
static
static HGIGL_API HgiGLOpsFn HgiGLOps::CopyTextureCpuToGpu ( HgiTextureCpuToGpuOp const &  copyOp)
static
static HGIGL_API HgiGLOpsFn HgiGLOps::CopyTextureGpuToCpu ( HgiTextureGpuToCpuOp const &  copyOp)
static
static HGIGL_API HgiGLOpsFn HgiGLOps::CopyTextureToBuffer ( HgiTextureToBufferOp const &  copyOp)
static
static HGIGL_API HgiGLOpsFn HgiGLOps::Dispatch ( int  dimX,
int  dimY 
)
static
static HGIGL_API HgiGLOpsFn HgiGLOps::Draw ( HgiPrimitiveType  primitiveType,
uint32_t  primitiveIndexSize,
uint32_t  vertexCount,
uint32_t  baseVertex,
uint32_t  instanceCount,
uint32_t  baseInstance 
)
static
static HGIGL_API HgiGLOpsFn HgiGLOps::DrawIndexed ( HgiPrimitiveType  primitiveType,
uint32_t  primitiveIndexSize,
HgiBufferHandle const &  indexBuffer,
uint32_t  indexCount,
uint32_t  indexBufferByteOffset,
uint32_t  baseVertex,
uint32_t  instanceCount,
uint32_t  baseInstance 
)
static
static HGIGL_API HgiGLOpsFn HgiGLOps::DrawIndexedIndirect ( HgiPrimitiveType  primitiveType,
uint32_t  primitiveIndexSize,
HgiBufferHandle const &  indexBuffer,
HgiBufferHandle const &  drawParameterBuffer,
uint32_t  drawBufferByteOffset,
uint32_t  drawCount,
uint32_t  stride 
)
static
static HGIGL_API HgiGLOpsFn HgiGLOps::DrawIndirect ( HgiPrimitiveType  primitiveType,
uint32_t  primitiveIndexSize,
HgiBufferHandle const &  drawParameterBuffer,
uint32_t  drawBufferByteOffset,
uint32_t  drawCount,
uint32_t  stride 
)
static
static HGIGL_API HgiGLOpsFn HgiGLOps::FillBuffer ( HgiBufferHandle const &  buffer,
uint8_t  value 
)
static
static HGIGL_API HgiGLOpsFn HgiGLOps::GenerateMipMaps ( HgiTextureHandle const &  texture)
static
static HGIGL_API HgiGLOpsFn HgiGLOps::InsertMemoryBarrier ( HgiMemoryBarrier  barrier)
static
static HGIGL_API HgiGLOpsFn HgiGLOps::PopDebugGroup ( )
static
static HGIGL_API HgiGLOpsFn HgiGLOps::PushDebugGroup ( const char *  label)
static
static HGIGL_API HgiGLOpsFn HgiGLOps::ResolveFramebuffer ( HgiGLDevice device,
HgiGraphicsCmdsDesc const &  graphicsCmds 
)
static
static HGIGL_API HgiGLOpsFn HgiGLOps::SetConstantValues ( HgiGraphicsPipelineHandle  pipeline,
HgiShaderStage  stages,
uint32_t  bindIndex,
uint32_t  byteSize,
const void data 
)
static
static HGIGL_API HgiGLOpsFn HgiGLOps::SetConstantValues ( HgiComputePipelineHandle  pipeline,
uint32_t  bindIndex,
uint32_t  byteSize,
const void data 
)
static
static HGIGL_API HgiGLOpsFn HgiGLOps::SetScissor ( GfVec4i const &  sc)
static
static HGIGL_API HgiGLOpsFn HgiGLOps::SetViewport ( GfVec4i const &  vp)
static

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