-
Notifications
You must be signed in to change notification settings - Fork 193
[wgsl-out] Write correct scalar kind when width != 4 #1514
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.
I gave it a quick look, but I have some concerns about certain parts of the current code and the wgsl spec that I would like clarified first before giving a more in depth review.
I think we shouldn't move forward with this approach. WGSL only supports 32 bit numbers and only recently added 16 bit floating point support trough an extension. We should instead error if we encounter anything that's not width == 4 and when we get to implement the f16 extension handle width == 2 then. |
I retract my previous comment. It looks like we already support non 32 bit numbers in the WGSL front-end and also handle validation of widths (depending on capabilities). |
@fintelia any updates on this? |
The current status is that I totally lost track of this PR and if anyone else wants to take over they should feel free. Otherwise, if this is something that the gfx-rs maintainers want to go forward with, when I have a chance I'd be happy to fix the conflicts and try to get this ready to merge. |
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.
There are still some unknowns but let's merge this for now.
We'll go over non 4 widths at a broader scale once we look into implementing the f16 extension (tracked by #1884) for WGSL (which will require for instance adding width data to matrices in the IR).
Related to #1272 (comment)