Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subgroup intrinsics #1151

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Conversation

Firestar99
Copy link

Adds support for subgroup intrinsics, see GL_KHR_shader_subgroup and SPIRV spec 3.49.24. Non-Uniform Instructions.

Note that the glsl extension only exposes spirv's OpGroupNonUniform* instructions, and NOT the OpGroup* instructions which can be found in 3.49.21. Group and Subgroup Instructions. As many OpGroup* instructions are only documented with Reserved., I assume during development they decided against these and switched to the OpGroupNonUniform* instructions.

Open Questions:

  • How should the intrinsic functions be named? spirv calls them OpGroupNonUniform*, glsl calls them subgroup*. I've decided to name them subgroup_non_uniform* but I'm wondering if the non_uniform should be dropped as they all are non uniform?
  • Many of the instructions take or return "a scalar or vector of floating-point type, integer type, or Boolean type", for which I've added the trait VectorOrScalar. But glam's boolean vectors seem to behave weirdly and not work, not even the compiletest arch/any uses them. So for now I've just left them unsupported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant