Skip to content
This repository has been archived by the owner on Jan 29, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[spv-out] reverseBits and countOneBits unimplemented
2 participants