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

Implement WaveMultiPrefix* for SPIRV and GLSL #6182

Merged
merged 7 commits into from
Jan 29, 2025

Conversation

fairywreath
Copy link
Contributor

@fairywreath fairywreath commented Jan 25, 2025

Closes #6180.

Adds support for arithmetic WaveMultiPrefix* operations for SPIRV and GLSL using SPV_NV_shader_subgroup_partitioned and GL_NV_shader_subgroup_partitioned.

  • There are no matrix overloads for WaveMultiPrefix* operations for SPIRV and GLSL. Matrix variants of WaveMultiPrefixSum and WaveMultiPrefixProduct are implemented with a loop.
  • Matrix variants of WaveMultiPrefixBit* are not implemented as SPIRV and GLSL does not support integer matrices.
  • WaveMultiPrefixCountBits is not implemented as an equivalent intrinsic does not exist on SPIRV/GLSL.

@fairywreath fairywreath requested a review from a team as a code owner January 25, 2025 07:17
//DISABLE_TEST:COMPARE_COMPUTE_EX:-slang -compute -shaderobj

//TEST:COMPARE_COMPUTE_EX:-slang -compute -dx12 -use-dxil -profile sm_6_5 -shaderobj
// We cannot test via GLSL as our glslang does not emit the required SPIRV version.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to bump the produced SPIRV version when compiling through glsl for a test?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use the __spirv_version(1.5) modifier to achieve that.

@fairywreath fairywreath marked this pull request as draft January 25, 2025 18:50
@fairywreath fairywreath marked this pull request as ready for review January 25, 2025 20:15
@csyonghe csyonghe added the pr: non-breaking PRs without breaking changes label Jan 25, 2025
@csyonghe csyonghe enabled auto-merge (squash) January 29, 2025 03:48
@csyonghe csyonghe merged commit 1c282b8 into shader-slang:master Jan 29, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: non-breaking PRs without breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support WaveMultiPrefix* operations for SPIRV/GLSL backend
2 participants