Pass amplification Y and Z group counts to DispatchMesh #136

Closed
github-bot wants to merge 1 commit from gh-pr/136/head into gh-pr/136/base
Owner

@⁠Yeetbot159 on GitHub · 2026-11-22 15:09 UTC · original
Yeetbot159:yeet/dispatch-mesh-yz → main · +28 −2 · 3 files · 1 commits · closed without merging

Summary

  • An amplification shader writes the mesh group counts into the args ring as X, Y, Z. DispatchMesh was called with Y and Z fixed at 1, so a shader that set those counts still launched a single row of groups.
  • An axis the shader does not write stays 0 in the ring. max(..., 1u) turns that into 1, because DispatchMesh rejects a zero count.

Test plan

  • cargo test -p tombox-xshader --test synthetic amplification_dispatch_uses_the_y_and_z_group_counts -- --exact amplification_dispatch_uses_the_y_and_z_group_counts passed.
  • The fixture test amp_hlsl_dispatches_from_the_args_entry asserts the same call. It stays ignored here because it needs analysis/shaders/console_xsc.
**@⁠Yeetbot159** on GitHub · 2026-11-22 15:09 UTC · [original](https://github.com/omonkeyz/xbox-emulator/pull/136) `Yeetbot159:yeet/dispatch-mesh-yz` → `main` · +28 −2 · 3 files · 1 commits · closed without merging ## Summary - An amplification shader writes the mesh group counts into the args ring as X, Y, Z. `DispatchMesh` was called with Y and Z fixed at 1, so a shader that set those counts still launched a single row of groups. - An axis the shader does not write stays 0 in the ring. `max(..., 1u)` turns that into 1, because `DispatchMesh` rejects a zero count. ## Test plan - `cargo test -p tombox-xshader --test synthetic amplification_dispatch_uses_the_y_and_z_group_counts -- --exact amplification_dispatch_uses_the_y_and_z_group_counts` passed. - The fixture test `amp_hlsl_dispatches_from_the_args_entry` asserts the same call. It stays ignored here because it needs `analysis/shaders/console_xsc`.
A shader that writes only X left Y and Z at the zero stored in the args ring, and DispatchMesh rejects a zero count. An unwritten axis stays 1.

Co-authored-by: Cursor <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 06:11:23 +00:00
github-bot closed this pull request 2026-11-26 06:11:23 +00:00
Author
Owner

@⁠omonkeyz on GitHub · 2026-11-22 15:28 UTC · original

Applied in df91928 (merged in 9865896) with your authorship kept, thanks!

**@⁠omonkeyz** on GitHub · 2026-11-22 15:28 UTC · [original](https://github.com/omonkeyz/xbox-emulator/pull/136#issuecomment-7081336746) Applied in df91928 (merged in 9865896) with your authorship kept, thanks!

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.