Skip to content

Conversation

inner-daemons
Copy link
Collaborator

@inner-daemons inner-daemons commented Oct 17, 2025

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

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy --tests. If applicable, add:
    • --target wasm32-unknown-unknown
  • Run cargo xtask test to run tests.
  • If this contains user-facing changes, add a CHANGELOG.md entry.

inner-daemons and others added 30 commits August 14, 2025 12:53
Copy link
Member

@ErichDonGubler ErichDonGubler left a 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
Copy link
Member

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cwfitzgerald thoughts?

PointCoord,
FrontFacing,
PrimitiveIndex,
PrimitiveIndex, // Also for mesh output
Copy link
Member

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.

Copy link
Collaborator Author

@inner-daemons inner-daemons Oct 17, 2025

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)

@inner-daemons
Copy link
Collaborator Author

Wow, thanks for looking at this so quickly @ErichDonGubler! Very good comments over-all.

inner-daemons added a commit to inner-daemons/wgpu that referenced this pull request Oct 17, 2025
@cwfitzgerald cwfitzgerald self-assigned this Oct 17, 2025
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