Skip to content
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

[wgsl-out] Write correct scalar kind when width != 4 #1514

Merged
merged 5 commits into from
Dec 12, 2022

Conversation

fintelia
Copy link
Contributor

@fintelia fintelia commented Nov 6, 2021

Related to #1272 (comment)

Copy link
Collaborator

@JCapucho JCapucho left a 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.

src/back/wgsl/writer.rs Outdated Show resolved Hide resolved
src/back/wgsl/writer.rs Show resolved Hide resolved
src/back/wgsl/writer.rs Show resolved Hide resolved
src/back/wgsl/writer.rs Outdated Show resolved Hide resolved
@teoxoy
Copy link
Member

teoxoy commented Apr 28, 2022

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.

@teoxoy
Copy link
Member

teoxoy commented Apr 30, 2022

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).

@teoxoy
Copy link
Member

teoxoy commented Jun 15, 2022

@fintelia any updates on this?

@fintelia
Copy link
Contributor Author

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.

Copy link
Member

@teoxoy teoxoy left a 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).

@teoxoy teoxoy requested a review from JCapucho December 2, 2022 11:17
@teoxoy teoxoy enabled auto-merge (squash) December 2, 2022 11:19
src/back/wgsl/writer.rs Outdated Show resolved Hide resolved
@teoxoy teoxoy dismissed JCapucho’s stale review December 12, 2022 09:56

Concerns addressed

@teoxoy teoxoy merged commit 4f77cba into gfx-rs:master Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants