abs only works on signed integer scalar or vector#1282
Conversation
|
abs on unsigned, if it exists, ought to be a no-op. Either remove the abs for unsigned argument (this PR), or modify the description. This may require discussion |
|
It would be nice to reach some guidelines for consistency of WGSL with regards to no-ops. For example, I recall that we allow casting the type to itself as a no-op, just because it will be easier to write generic code. Should the same argument apply to abs()? And if not, why? |
|
My position is we should keep this as allowed and spec it as a no-op. |
|
Mini-investigation:
|
In the unsigned case it's the identity function.
|
I changed to PR to keep the unsigned case, but split it out into its own rows and describe it as the identity function. I'm ok with either path, as long as we eliminate the implication of 'abs' on unsigned as mapping to GLSLstd450SAbs, because that's a bug. |
|
Resolved in on today's call: https://docs.google.com/document/d/1xgCv1_xzo6kRmCfwOtnPd2j_T4unot71BOnlF-gOlIE |
…1417) This PR adds unimplmented stubs for the read-write-modify atomic operations. * `atomicAdd` * `atomicAnd` * `atomicCompareExchangeWeak` * `atomicExchange` * `atomicMax` * `atomicMin` * `atomicOr` * `atomicSub` * `atomicXor` Issue gpuweb#1275, gpuweb#1276, gpuweb#1277, gpuweb#1278, gpuweb#1279, gpuweb#1280, gpuweb#1281, gpuweb#1282, gpuweb#1283
It doesn't make sense for it to apply to unsigned integer scalar or
vector. It's a no-op in that case.