In glsl it's possible to set the thread group / work group size for compute shaders via specialization constants. This allows an application to use different sizes depending e.g. on the hardware limits, without the need for different shaders.
The GL_ARB_gl_spirv extension added explicit qualifiers for this:
"The built-in constant vector gl_WorkGroupSize can be specialized using
the local_size_{xyz}_id qualifiers, to individually give the components
an id. For example:
layout(local_size_x_id = 18, local_size_z_id = 19) in;
There doesn't seem to be an equivalent of this for HLSL to SPIR-V right now.
In glsl it's possible to set the thread group / work group size for compute shaders via specialization constants. This allows an application to use different sizes depending e.g. on the hardware limits, without the need for different shaders.
The
GL_ARB_gl_spirvextension added explicit qualifiers for this:There doesn't seem to be an equivalent of this for HLSL to SPIR-V right now.