Skip to content

Conversation

SupaMaggie70Incorporated
Copy link
Contributor

@SupaMaggie70Incorporated SupaMaggie70Incorporated commented Aug 16, 2025

Connections
Addresses #7219, a sub-issue of #7197

Description
This adds a DX12 backend for mesh shaders

Current issues:

  • Limits aren't calculated properly
  • In the pipeline stream descriptor, we could figure out the maximum length and possibly avoid allocations and vec's if that's desirable

Testing
I have updated the mesh shader example to use DXILpassthrough to test this, and it works.

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.

@SupaMaggie70Incorporated SupaMaggie70Incorporated requested a review from a team as a code owner August 16, 2025 04:01
@SupaMaggie70Incorporated SupaMaggie70Incorporated marked this pull request as draft August 16, 2025 04:01
@SupaMaggie70Incorporated SupaMaggie70Incorporated marked this pull request as ready for review August 16, 2025 20:22
@cwfitzgerald cwfitzgerald changed the title Mesh shading/dx12 backend [hal/dx12] Mesh Shaders Aug 20, 2025
@cwfitzgerald cwfitzgerald self-assigned this Aug 27, 2025
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.

Broadly looks good, I have some questions/concerns. I'm definitely going to want to do at least one more pass where I actually clone this locally to poke around.

mesh_pipeline_build(&ctx, None, BASIC_MESH, None, true);
pub static MESH_PIPELINE_BASIC_MESH: GpuTestConfiguration =
default_gpu_test_config(DrawType::Standard).run_sync(|ctx| {
mesh_pipeline_build(&ctx, false, false, true);
Copy link
Member

Choose a reason for hiding this comment

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

Too may bools here - can we use a enum(s)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've tried to address this by using a struct, not sure its much of an improvement at all though.

Comment on lines +11 to +13
# These use "-Fo" as an argument to DXC
'examples/features/src/mesh_shader/mod.rs',
'tests/tests/wgpu-gpu/mesh_shader/mod.rs',
Copy link
Member

Choose a reason for hiding this comment

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

You should add "Fo" to the list of extend-words or identifiers, not block the whole shader.

Copy link
Contributor Author

@SupaMaggie70Incorporated SupaMaggie70Incorporated Aug 28, 2025

Choose a reason for hiding this comment

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

I think that "Fo"->"Do" or "Fo"->"Go" or "Fo"->"To" etc are close enough on the keyboard and common enough that it would be worth more to keep Fo disallowed than to block it for a single function used in 2 files.

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.

2 participants