Skip to main content

Module dispatch

Module dispatch 

Source
Expand description

Compute shader compilation, dispatch, pipeline caching, and profiling.

Provides the core compute dispatch pipeline:

  • ShaderSource with #define injection
  • ComputeProgram with compile/link/validate
  • WorkgroupSize calculation with hardware-limit awareness
  • ComputeDispatch for 1D/2D/3D and indirect dispatch
  • PipelineCache for shader reuse
  • SpecializationConstant for compile-time constants
  • ComputeProfiler with GPU timer queries

Structs§

ChainStep
A single step in a compute chain.
ComputeChain
A chain of compute dispatches to be executed in sequence with barriers between them.
ComputeDispatch
Executes compute shader dispatches.
ComputeProfiler
Profiles compute dispatches with per-dispatch GPU timing.
ComputeProgram
A compiled and linked compute shader program.
IndirectDispatchArgs
Arguments for an indirect dispatch (read from a buffer on the GPU).
PipelineCache
Caches compiled compute programs by their source hash.
PipelineState
Snapshot of the state needed for a compute dispatch.
ShaderPreprocessor
Simple shader preprocessor that resolves #include "name" directives from a registered library of snippets.
ShaderSource
A compute shader source with support for #define injection and includes.
SpecializationConstant
A specialization constant that can be set at compile time. In OpenGL this is simulated via #define injection.
TimingQuery
A GPU timer query for measuring dispatch duration.
WorkgroupLimits
Hardware workgroup limits queried from the GL context.
WorkgroupSize
Computes optimal workgroup sizes for dispatch, respecting hardware limits.

Enums§

DispatchDimension
Describes the dispatch dimensionality.
UniformValue
A uniform value to set before dispatch.

Functions§

apply_specializations
Apply a set of specialization constants to a shader source.