GPU: route indirect dispatch_mesh_x through State::execute_indirect #1546
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1546
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1546"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@n-romanovich on GitHub · 2026-11-24 19:01 UTC · original
n-romanovich:fix/indirect-mesh-dispatch→main· +58 −7 · 1 files · 2 commits · openSummary
Fixes Issue #756.
Routes indirect
DispatchMeshXcalls (indirect != 0) throughState::execute_indirectas a singleMESH(kind = 10,stride = 12) command instead of silently dropping them, reusing the existing GPU argument clamp (indirect::bound) and command signature cache.crates/victory-gpu/src/list.rs:dispatch_mesh_xwithindirect != 0tos.execute_indirect(list, (10, 12, 1), indirect, None).INDIRECTand log once (withindirectaddress) ifexecute_indirectreturnsfalse.flagsorpayloadare passed.indirect_dispatch_mesh_x_routes_through_execute_indirect.Testing
Tested on Windows 11, NVIDIA GeForce RTX 5060 Ti:
cargo clippy --workspace --all-targets --locked -- -D warnings(pass)cargo clippy --workspace --all-targets --all-features --locked -- -D warnings(pass)cargo test -p victory-gpu --locked(51 passed, 0 failed, 1 ignored)AI-assisted: implemented and reviewed with AI assistance.
@acetonahard-code on GitHub · 2026-11-24 22:27 UTC · original
Heads-up: #24 (opened yesterday) also routes indirect
DispatchMeshXthroughexecute_indirectinstead of dropping it. The two conflict inlist.rs.Tested on Windows 11, RTX 4070 SUPER (driver 621.14), with the repo toolchain, merged into current
main(70564ae):cargo test -p victory-gpumainmain+ this PRmain,--all-featuresmain+ this PR,--all-featurescargo clippy --all-targets -- -D warnings, with and without--all-features: clean.cargo fmt --checkwould rewrap one block this PR adds (list.rs).mainisn't rustfmt-clean either, so take it or leave it.victory-gputests fail on currentmainon this NVIDIA card:dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_views. That's the 1,000,000-view heap cap, see #1744. They fail the same way with this PR, and no other test does.I didn't test with game data.
Tested locally with an AI-assisted script (Claude Code); I checked the results before posting.
@Marvisak on GitHub · 2026-11-25 01:30 UTC · original · edited 2026-11-25 20:22 UTC
Automated triage for the maintainers.
Needs work. The new commit
d1892690addresses the wording points from the previous review incrates/victory-gpu/src/list.rs:dispatch_mesh_xnow says the 12-byte(x, y, z)record is inferred. That makes it honest, but an inference isn't evidence yet.execute_indirectreturns false because no pipeline is bound. A new assertion checks thatindirect == 0takes the direct path and doesn't count a drop. Onmainan indirect call was dropped without counting, so the test now does tell the two versions apart.dispatch_mesh's warning check now useschecked_mul.What still decides the verdict is the same as for #24: evidence for the argument layout at this call. That means the title's code that fills the buffer, or buffer contents seen at a real
DispatchMeshXwith an indirect address. A tester on #24 reported that the sampled scene never makes such a call. Without the evidence, this routes GPU memory of unknown shape into a mesh dispatch.Overlap. #24 and #1749 still make the same change in
list.rs, and #2014 changesdispatch_meshright next to it. Of the three, this one is the most complete (rebased, with a test), so it is a reasonable one to keep. Please agree with the other authors, and once the layout evidence is here this can move forward.CI: passing.
Generated by Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.