Repository navigation
GPU: DispatchMesh with no groups in a dimension runs nothing, and its group counts are not multiplied - #2300
denkencar-sketch wants to merge 1 commit into
Conversation
… group counts are not multiplied y * z overflowed u32 for large counts, and a zero y or z still dispatched x groups.
catminou4
left a comment
There was a problem hiding this comment.
DispatchMesh with a zero group dimension runs nothing; product-overflow case covered by test. Static review only: victory-gpu/victory-hle are Windows-only (D3D12/windows-sys); not compiled or tested on this macOS arm64 host. rustc 1.98.1.
|
Automated triage for the maintainers. Merge candidate (worth a look). In Small note: the new test only catches the overflow abort; as the description says, the zero-group calls also pass on Generated by Claude Code |
|
Automated triage for the maintainers, second look (a review against current Closing as a duplicate of #2014, which makes the same change to the same function and tests the zero-dimension cases as well as the overflow. The change itself is right. If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution. |
Summary
DispatchMeshmultiplied its group counts, which overflowedu32for large counts, and a zero y or z still dispatched x groups. A dispatch with no groups in a dimension now runs nothing and the counts are not multiplied.Testing
Test
mesh_dispatches_with_overflowing_or_zero_groups_do_nothingfails onmain(overflow abort) and passes with this change.cargo test --workspace --lockedpasses apart from known flakes:modules::dstorage::tests::a_page_list_filled_after_its_request_startsfails now and then onmaintoo, and so does a parallel-run flake invictory-gpu's lib tests (watch::anddescriptor::host::tests, 2 of 40 runs on pristinemain).Not covered by an assertion: the zero-group early return (
(16,0,1)and(0,1,1)also pass onmain). Not tried: a run in the game.AI-assisted.