Skip to content

[SPIR-V] Allow thread group size to be specified with specialization constants #3092

Open
@SaschaWillems

Description

@SaschaWillems

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.

Metadata

Metadata

Assignees

Labels

spirvWork related to SPIR-V

Type

No type

Projects

  • Status

    In progress
  • Status

    Triaged

Relationships

None yet

Development

No branches or pull requests

Issue actions