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 reverseBits and countOneBits for SPIR-V #1897

Merged
merged 3 commits into from
May 9, 2022

Conversation

hasali19
Copy link
Contributor

@hasali19 hasali19 commented May 9, 2022

Closes #1895

@teoxoy
Copy link
Member

teoxoy commented May 9, 2022

Looks good!

Just to make sure everything works as expected, could you add those 2 functions to the test file at tests/in/bits.wgsl? (remember to run cargo test so that the snapshots get generated)

@hasali19
Copy link
Contributor Author

hasali19 commented May 9, 2022

Looks like the glsl implementation is incorrect. I think bitCount always returns a signed integer so needs a conversion.

Copy link
Member

@teoxoy teoxoy left a comment

Choose a reason for hiding this comment

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

Good stuff!

I think the GLSL change is small enough to not warrant a separate PR.

@teoxoy teoxoy merged commit 934fa16 into gfx-rs:master May 9, 2022
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.

[spv-out] reverseBits and countOneBits unimplemented
2 participants