Pass amplification Y and Z group counts to DispatchMesh #136

Closed
Yeetbot159 wants to merge 1 commit from upstream-pr/136 into main
Yeetbot159 commented 2026-11-22 15:09:22 +00:00 (Migrated from github.com)

Imported from omonkeyz/xbox-emulator. Originally posted by Yeetbot159 on 2026-11-22T15:09:22Z.


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.
<!-- greyfinch-sync:omonkeyz/xbox-emulator:issue:6543984309 --> Imported from [omonkeyz/xbox-emulator](https://github.com/omonkeyz/xbox-emulator/pull/136). Originally posted by [Yeetbot159](https://github.com/Yeetbot159) on 2026-11-22T15:09:22Z. --- ## 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`.
omonkeyz commented 2026-11-22 15:28:58 +00:00 (Migrated from github.com)

Imported from omonkeyz/xbox-emulator. Originally posted by omonkeyz on 2026-11-22T15:28:58Z.


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

<!-- greyfinch-sync:omonkeyz/xbox-emulator:comment:7081336746 --> Imported from [omonkeyz/xbox-emulator](https://github.com/omonkeyz/xbox-emulator/pull/136#issuecomment-7081336746). Originally posted by [omonkeyz](https://github.com/omonkeyz) on 2026-11-22T15:28:58Z. --- Applied in df91928 (merged in 9865896) with your authorship kept, thanks!

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
omonkeyz/xbox-emulator!136
No description provided.