Skip to content

Conversation

@s-perron
Copy link
Collaborator

In SPIR-V, the number of thread in the group can be specificed using the
LocalSize execution mode. This corresponds nicely with the
numthreads attribute in HLSL.

However there is another way. You can use LocalSizeId, which uses ids
of other instructions. This allows spec constants to be provided as a
dimention on the local size id.

This PR adds a new attribute that can be used instead of the
numthreads attribute. It allows constant expression or spec constants
as parameters.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 24, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

In SPIR-V, the number of thread in the group can be specificed using the
`LocalSize` execution mode. This corresponds nicely with the
`numthreads` attribute in HLSL.

However there is another way. You can use `LocalSizeId`, which uses ids
of other instructions. This allows spec constants to be provided as a
dimention on the local size id.

This PR adds a new attribute that can be used instead of the
`numthreads` attribute. It allows constant expression or spec constants
as parameters.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

1 participant