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 floating-point pack/unpack intrinsics for all targets #6503

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

fairywreath
Copy link
Contributor

Closes #6175.

Adds floating-point pack/unpack intrinsics for all targets. Some of the implementation code is taken from the already implemented GLSL variants but a lot of the logic for unsupported targets are incorrect and there were no functional tests
to verify them. This PR fixes them and adds full test suites for all targets.

Additionally fixes the SM 6.6 requirement for HLSL integer pack/unpack intrinsics.

@fairywreath fairywreath requested a review from a team as a code owner March 1, 2025 23:10
csyonghe
csyonghe previously approved these changes Mar 2, 2025
Copy link
Collaborator

@csyonghe csyonghe left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@@ -1076,6 +1076,9 @@ Compound Capabilities
`shader5_sm_5_0`
> Capabilities required to use sm_5_0 features apart of GL_ARB_gpu_shader5

`pack_unpack`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggest naming it to “pack_float” instead.

Copy link
Contributor Author

@fairywreath fairywreath Mar 2, 2025

Choose a reason for hiding this comment

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

This capability is also used for integer pack/unpack intrinsics. The main reason this cap is added is to combine GL_ARB_gpu_shader5 with sm 6.6(which introduces HLSL integer pack/unpack intrinsics). I can change this to pack if that is still better than pack_unpack.

Copy link
Collaborator

Choose a reason for hiding this comment

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

pack_vector?

@csyonghe csyonghe added the pr: non-breaking PRs without breaking changes label Mar 2, 2025
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 GLSL/WGSL float packing intrinsics
2 participants