-
Notifications
You must be signed in to change notification settings - Fork 1.1k
WGSL parsing for mesh shaders #8370
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
base: trunk
Are you sure you want to change the base?
WGSL parsing for mesh shaders #8370
Conversation
Co-authored-by: Jim Blandy <[email protected]>
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.
Took a few minutes to look at things I knew I'd have opinions on. Didn't cover (even half of) the full breadth of this, and I don't plan to unless I get assigned to it, but hopefully this feels like good feedback. 😊
/// | ||
/// [`enable clip_distances;`]: https://www.w3.org/TR/WGSL/#extension-clip_distances | ||
ClipDistances, | ||
/// Enables the `mesh_shader` extension, native only |
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.
thought: I wonder if it'd be an easier diagnostic experience across the board (esp. with bug reports in places not immediately related to wgpu) to have a naga_*
prefix for Naga-specific extensions.
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.
@cwfitzgerald thoughts?
naga/src/ir/mod.rs
Outdated
PointCoord, | ||
FrontFacing, | ||
PrimitiveIndex, | ||
PrimitiveIndex, // Also for mesh output |
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.
suggestion: Shall we turn this and the other small comments around it into doc commenta instead? They seem like helpful notes in a maintainer's or dev.'s experience, not just somebody who happens to be looking at this code.
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've added some docs to this, let me know what you think (FYI the changes related to IR and docs are mostly in #8104. The only point of this PR is to add a WGSL parser)
Wow, thanks for looking at this so quickly @ErichDonGubler! Very good comments over-all. |
Co-authored-by: Erich Gubler <[email protected]>
Co-authored-by: Erich Gubler <[email protected]>
Co-authored-by: Erich Gubler <[email protected]>
Connections
Depends on & used to test #8104
Description
Adds WGSL parsing for mesh shaders to naga.
This builds on #8104, and many of the changes here come from that PR.
Testing
There are mesh shader tests (that don't actually write to any backend)
Squash or Rebase?
Squash
Checklist
cargo fmt
.taplo format
.cargo clippy --tests
. If applicable, add:--target wasm32-unknown-unknown
cargo xtask test
to run tests.CHANGELOG.md
entry.