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

Fix semantics type for control barriers to support multiple flags #598

Merged
merged 3 commits into from
Apr 22, 2021

Conversation

msiglreith
Copy link
Contributor

Fixes #581

control_barrier API now matches memory_barrier by using a u32 instead of an enum type for specifying Semantics bitflags.

@XAMPPRocky
Copy link
Member

Thank you for PR! I think we might as well switch the Semantics type to using bitflags than go to u32, I've already had to add bitflags for RayFlags.

@msiglreith
Copy link
Contributor Author

Pushed a change with converting the enum to bitflags after the discussion on discord.
As const trait impls are behind a nightly feature flag in Rust, the from_bits_truncate workaround is needed in case of multiple flags.

Co-authored-by: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com>
@XAMPPRocky XAMPPRocky merged commit 3d710e7 into EmbarkStudios:main Apr 22, 2021
XAMPPRocky added a commit that referenced this pull request May 3, 2021
* Fix semantics type for control barriers to support multiple flags

* spirv-std: convert memory semantics to bitflag

* Update crates/spirv-std/src/arch/barrier.rs

Co-authored-by: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com>

Co-authored-by: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com>
@khyperia khyperia removed their request for review May 31, 2021 09:26
@msiglreith msiglreith deleted the control-barrier branch August 26, 2021 10:28
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.

barrier SEMANTICS const generic as bitflag
2 participants