-
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 Any chance a review for this could happen soon-ish? I'm waiting on it to continue working on both my PRs #8139 and #8206, since they will modify many of the same files. |
I should be able to re-review it today. |
@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 |
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.