LLGL 0.05 Beta
Loading...
Searching...
No Matches
LLGL::ComputeShaderAttributes Struct Reference

Compute shader specific descriptor structure. More...

#include <ShaderFlags.h>

Public Attributes

Extent3D workGroupSize = { 1, 1, 1 }
 Specifies the number of threads per threadgroup in X, Y, and Z direction. By default (1, 1, 1).

Detailed Description

Compute shader specific descriptor structure.

See also
ShaderDescriptor::compute
ShaderReflection::compute

Member Data Documentation

◆ workGroupSize

Extent3D LLGL::ComputeShaderAttributes::workGroupSize = { 1, 1, 1 }

Specifies the number of threads per threadgroup in X, Y, and Z direction. By default (1, 1, 1).

Remarks
Each component must be greater than zero.
Only the Metal backend supports dispatch compute kernels with dynamic work group sizes. If not used for shader reflection, all other renderers need to specified the workgroup size within the shader code:
  • For GLSL: layout(local_size_x = X, local_size_y = Y, local_size_z = Z)
  • For HLSL: [numthreads(X, Y, Z)]

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