Skip to content

Conversation

@inner-daemons
Copy link
Collaborator

Connections
#7197

Description
Previously, when building mesh shader pipelines, we would pretend they are compute shader stages since they must've been passed through anyway. This PR addresses that, mostly finishing the mesh shader work for wgpu-hal.

Testing

Squash or Rebase?

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy. 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 inner-daemons requested a review from a team as a code owner March 7, 2025 03:33
@inner-daemons inner-daemons mentioned this pull request Mar 7, 2025
42 tasks
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.

This LGTM, minus a question about nomenclature. I'm a graphic programming novice, but Task seems like an overly general shader stage name, given the docs. Perhaps it would be better to rename to MeshTask instead?

@inner-daemons
Copy link
Collaborator Author

@ErichDonGubler I don't claim to be an expert either lol. Perhaps that is a good idea, or switching it to something like amplification shaders as DX12 calls them. @cwfitzgerald said in this comment:

Terminology - task vs amplification vs object shaders? Not important, I'm going with task shaders for now

sgtm, I'm sure the webgpu committee will call them something entirely different anyway

Your call(or cw's ig), we do want these names to not be immediately confusing to someone reading the code!

@cwfitzgerald cwfitzgerald enabled auto-merge (squash) March 15, 2025 05:28
@cwfitzgerald
Copy link
Member

cwfitzgerald commented Mar 15, 2025

I'm a graphic programming novice, but Task seems like an overly general shader stage name, given the docs.

@ErichDonGubler Tell that to vulkan :)

Metal calls them Object shaders, Vulkan calls them Task, D3D12 calls them Amplification. We should just pick one and move on for now - task is fine.

@cwfitzgerald cwfitzgerald merged commit e8ce3ae into gfx-rs:trunk Mar 15, 2025
36 checks passed
@inner-daemons inner-daemons deleted the mesh-shading/naga-shader-stages branch March 15, 2025 05:35
const VERTEX_FRAGMENT = Self::VERTEX.bits() | Self::FRAGMENT.bits();
/// Binding is visible from the task shader of a mesh pipeline
const TASK = 1 << 3;
/// Binding is visible from the mesh shader of a mesh pipeline
Copy link
Collaborator

Choose a reason for hiding this comment

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

Too late now, but could've used a period at the end of these sentences.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch, I'll fix that in a subsequent PR

sharmajai pushed a commit to sharmajai/wgpu that referenced this pull request Oct 12, 2025
…x-rs#7292)

* Initial changes

* Fixed metal backend in wgpu-hal, ran tests
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