-
Notifications
You must be signed in to change notification settings - Fork 193
Conversation
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.
We should also document that Literal::F32
and Literal::F64
must not be nan or infinity.
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.
Sorry - could we also get some coverage in tests/wgsl-errors.rs
?
It's not possible to spell out NaNs or infinities in WGSL though. I did run a manual test here: #2461 (comment).
Should we? I keep going back and forth on what's best for IR documentation. So far I've been of the opinion that if validation covers it there is no need to document what the validation is already doing but let me know what you think! In this case we'll also most likely get an extension + capability which will allow NaNs and infinities. |
Oh, that's true. If this change were more involved I would want to imitate the unit tests from
Yes, this is a risk. On the balance, though, I think it's really valuable to have the |
WGSL doesn't currently allow NaNs and infinities.
Resolves #2461.