Skip to content

Conversation

@inner-daemons
Copy link
Collaborator

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

Connections
Part of #7197
Closes #7219
Related to #8739
Depends on #8756

Description
Adds support for mesh shaders to HLSL writer. There still exist some things to do:

  • Disable some mesh outputs that are unused in the fragment shader
  • Limit dispatched workgroup counts
  • Only expose mesh shader feature on DX12 if DXC with shader model is supported
  • Require shader model 6.5 in naga
  • Changelog entry

Testing
Existing tests, snapshots

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.

@cwfitzgerald cwfitzgerald self-assigned this Jan 7, 2026
Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

You know, the youzh

Comment on lines +102 to +103
@mesh(mesh_output) @workgroup_size(2, 1, 1)
fn ms_divergent(@builtin(local_invocation_id) thread_id_1: vec3<u32>) {
Copy link
Member

Choose a reason for hiding this comment

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

Why was this changed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Our HLSL writer has a bug where it doesn't consider the local_invocation_index being written by the zero-initializer/mesh shader output loop to be a builtin. So I had to use an alternative here, since local_invocation_index was being used elsewhere

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.

Mesh Shading for DirectX 12

2 participants