Ask questions.abs() and .signum() cause 64-bit integer instruction generation
This is arguably not rust-gpu's fault, but num-traits, but it'll happen again, so we need a record of it.
Using vector abs ends up generating 64-bit ops due to https://github.com/rust-num/num-traits/blob/47d69223ce7707ebbf8a91c3e6b3997e48653feb/src/float.rs#L762 .
Also see the following image:
Ideally of course, abs should just generate a SPIR-V abs instruction instead of doing bithacks.
Answer questions XAMPPRocky
…and I don't believe
copysignexists in num-traits for some reason.
@khyperia I opened a PR for it awhile ago https://github.com/rust-num/num-traits/pull/207. I've sent them a friendly ping to look at it again.
Related questionsNo questions were found.