-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[hal/dx12] Mesh Shaders #8110
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
[hal/dx12] Mesh Shaders #8110
Conversation
@cwfitzgerald Going to ping you again, not super urgent but it is something I'd like to get reviewed soon-ish. |
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.
Pull Request Overview
This PR adds DirectX12 backend support for mesh shaders, expanding WGPU's mesh shader capabilities beyond Vulkan. The implementation includes direct draw commands, indirect draw variants, and proper pipeline state handling for both task and mesh shaders.
- Implements mesh shader pipeline creation using D3D12's pipeline stream API
- Adds mesh shader draw command implementations (direct and indirect variants)
- Updates examples and tests to support both Vulkan and DX12 backends
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
wgpu-hal/src/dx12/mod.rs | Adds mesh shader pipeline state stream structure and command signature support |
wgpu-hal/src/dx12/device.rs | Implements mesh shader pipeline creation and command signature setup |
wgpu-hal/src/dx12/command.rs | Implements mesh shader draw commands (direct and indirect variants) |
wgpu-hal/src/dx12/adapter.rs | Adds mesh shader feature detection and limit configuration |
tests/tests/wgpu-gpu/mesh_shader/mod.rs | Updates tests to support both Vulkan and DX12 backends with shader compilation |
examples/features/src/mesh_shader/mod.rs | Updates example to support DX12 backend with HLSL shader compilation |
naga/src/back/hlsl/mod.rs | Adds HLSL stage string mappings for task and mesh shaders |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
Got some nits, but we're good here once those are resolved.
Co-authored-by: Connor Fitzgerald <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Connor Fitzgerald <[email protected]>
@cwfitzgerald I've addressed all comments I think. Good to merge? |
CI mad |
@cwfitzgerald Should be good now lmao |
@vorporeal Thanks for reporting this and doing the work to bisect it. Definitely file an issue. I won't personally be able to get to this for at least a few days since I'll be away from my windows machine. It seems like it will be a big issue for many people so definitely get it on the radar of more maintainers. CC: @cwfitzgerald |
Yup, definitely file an issue, if you have reproduction code too, that should be good. |
Filed #8296; will see if I can reproduce with any of the examples and update that issue accordingly. |
Connections
Addresses #7219, a sub-issue of #7197
Description
This adds a DX12 backend for mesh shaders
Current issues:
Testing
I have updated the mesh shader example to use DXILpassthrough to test this, and it works.
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.