Expand description
Compute shader compilation, dispatch, pipeline caching, and profiling.
Provides the core compute dispatch pipeline:
ShaderSourcewith#defineinjectionComputeProgramwith compile/link/validateWorkgroupSizecalculation with hardware-limit awarenessComputeDispatchfor 1D/2D/3D and indirect dispatchPipelineCachefor shader reuseSpecializationConstantfor compile-time constantsComputeProfilerwith GPU timer queries
Structs§
- Chain
Step - A single step in a compute chain.
- Compute
Chain - A chain of compute dispatches to be executed in sequence with barriers between them.
- Compute
Dispatch - Executes compute shader dispatches.
- Compute
Profiler - Profiles compute dispatches with per-dispatch GPU timing.
- Compute
Program - A compiled and linked compute shader program.
- Indirect
Dispatch Args - Arguments for an indirect dispatch (read from a buffer on the GPU).
- Pipeline
Cache - Caches compiled compute programs by their source hash.
- Pipeline
State - Snapshot of the state needed for a compute dispatch.
- Shader
Preprocessor - Simple shader preprocessor that resolves
#include "name"directives from a registered library of snippets. - Shader
Source - A compute shader source with support for
#defineinjection and includes. - Specialization
Constant - A specialization constant that can be set at compile time.
In OpenGL this is simulated via
#defineinjection. - Timing
Query - A GPU timer query for measuring dispatch duration.
- Workgroup
Limits - Hardware workgroup limits queried from the GL context.
- Workgroup
Size - Computes optimal workgroup sizes for dispatch, respecting hardware limits.
Enums§
- Dispatch
Dimension - Describes the dispatch dimensionality.
- Uniform
Value - A uniform value to set before dispatch.
Functions§
- apply_
specializations - Apply a set of specialization constants to a shader source.