-
Notifications
You must be signed in to change notification settings - Fork 195
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
[hlsl-out] Fix countOneBits and reverseBits for signed integers #1928
Conversation
01325c6
to
4345578
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Could you add HLSL to this list and generate the snapshot for it?
Lines 418 to 419 in 60ae549
"bits", | |
Targets::SPIRV | Targets::METAL | Targets::GLSL | Targets::WGSL, |
src/back/hlsl/writer.rs
Outdated
@@ -2190,6 +2190,7 @@ impl<'a, W: fmt::Write> super::Writer<'a, W> { | |||
Asincosh { is_sin: bool }, | |||
Atanh, | |||
Regular(&'static str), | |||
UintWrapped(&'static str), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we name this NoIntOverload
or MissingIntOverload
? What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was trying to think of a good name, that sounds much better!
4345578
to
fad0610
Compare
I noticed that previously and attempted to add it, but it looks like there are some other functions which aren't implemented yet causing it to fail:
|
Alright, we can enable the test later then. Thanks! |
This PR fixes usage of the HLSL
countbits
andreversebits
functions with signed integers, by adding the necessaryasuint
andasint
conversions.Fixes #1904