GPU: run indirect mesh dispatches (DispatchMeshX) through indirect execution #24
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!24
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-24"
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?
@artor410 on GitHub · 2026-11-23 23:18 UTC · original
artor410:indirect-mesh-dispatch→main· +74 −13 · 1 files · 1 commits · openSummary
DispatchMeshXwith an indirect address was dropped. It now goes through the indirect execution added in8c26061, so it gets the same argument clamp, budget andINDIRECT_ARGUMENTtransition as the title'sExecuteIndirect:Argument layout is inferred, not documented, and I can't add evidence for
DispatchMeshXitself: I work without game files. Someone with the title would need to confirm it (buffer contents at that call): three 32-bit group counts (D3D12_DISPATCH_MESH_ARGUMENTS), as the title's own mesh dispatch signatures use (stride 12);xis then unused,flagsandpayloadunknown. Noted in the doc comment.Also on the direct
DispatchMesh(x, y, z)path (split out as #2014, which can go in alone):Evidence
No game files were used, and this is untested against the game. New unit tests in
list.rs:indirect_mesh_dispatches_not_run_are_counted: a title list'sDispatchMeshX(0, 0, &[7, 1, 1], 0)with indirect execution off. Before: dropped silently,INDIRECTunchanged (fails). After: counted (passes).mesh_dispatches_run_x_groups_unless_empty:(5,1,1) → 5,(5,0,1),(5,1,0),(0,1,1) → none,(5,2,3) → 5,(5,MAX,MAX) → 5with no overflow.cargo test -p victory-gpu: 38 passed.cargo clippy -p victory-gpu --all-targets(with and withoutdiagnostics) adds no warnings, andcargo xtask policypasses. The changed lines are rustfmt-clean. On my machinevictory-loader'sload_probefails for an unrelated reason: the checkout path is too long forlink.exewhen building the fixture.Merge Danger
Door: two-way
Blast Radius: small
Indirect
DispatchMeshXcalls now run instead of being dropped (or are counted when they can't run); an empty-dimensionDispatchMeshno longer draws.🤖 Generated with Claude Code
@jeremygold02 on GitHub · 2026-11-24 04:14 UTC · original
Thanks @artor410 for this change. I tested the open PR at head
4b76fffb956fdc3c813f3573a26e093ae7969fb4with:Result: 38 passed, 0 failed. This includes
indirect_mesh_dispatches_not_run_are_counted, which checks that an indirect mesh dispatch is counted when indirect execution is disabled, andmesh_dispatches_run_x_groups_unless_empty, which covers zero dimensions, non-unit y/z dimensions, andu32::MAXvalues without overflow.These are library unit tests; no title or game runtime was launched. The added regression cases are in list.rs.
@Raxstreams on GitHub · 2026-11-24 05:08 UTC · original
Ported the indirect DispatchMeshX path onto a Windows integration branch where normal ExecuteIndirect is already enabled. Both mesh_dispatches_run_x_groups_unless_empty and indirect_mesh_dispatches_not_run_are_counted passed on the RTX 3080 Ti host. Our sampled scene already uses ordinary indirect mesh draws. I have not observed a DispatchMeshX call with an indirect address in this scene.
@artor410 on GitHub · 2026-11-24 07:06 UTC · original
Rebased onto main (
d5f41f5): indirect execution is now always on there, so the indirect DispatchMeshX path runs without the removed VICTORY_INDIRECT switch;cargo test -p victory-gpu --lib: 45 passed. Thanks @jeremygold02 and @Raxstreams for testing.@dcastell1 on GitHub · 2026-11-24 11:34 UTC · original
Verified as part of the world-stack several testers are using, on NVIDIA GeForce RTX 5090, driver 621.24, Windows 11 10.0.26300, Rust 1.98.1, MSVC 14.44.35207, debug build:
So on Blackwell the stack builds and the workspace is green with it applied; #413 is the one that does not apply to current main (it is marked conflicting). What I cannot answer from here is the G-buffer effect — this box has no retail package, so the frame counts have to come from a machine that runs the title.
AI-assisted (opencode): applied the stack to a built tree, ran the suite, reverted it.
@EduBertozzi on GitHub · 2026-11-24 12:50 UTC · original
Windows 10 + Pascal data point (tests only, no game run).
Setup: Windows 10 Education 22H2 (19045), GTX 1060 6 GB (582.66), Rust 1.98.1, debug. I tested
d5f41f5merged (cleanly) onto my mesh fallback branch from #3, which is today'smainplus a compute form of mesh programs. That branch runs indirect mesh dispatches throughState::execute_indirecttoo, so it is the case where both meet.cargo test -p victory-gpu: 59 passed, 0 failed, includingmesh_dispatches_run_x_groups_unless_emptyandindirect_mesh_dispatches_not_run_are_counted.cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.Because this sends
DispatchMeshXtoexecute_indirectas kind 10 (stride 12, one record), a host without mesh shaders that takes the fallback also gets these dispatches, with no change on either side.AI-assisted (Claude Code); runs on my machine.
@artor410 on GitHub · 2026-11-24 23:06 UTC · original
Rebased onto main (
70564ae), conflict in list.rs tests resolved (kept both). Mesh tests pass;dynamic_slots_are_held_until_releasedandlists_share_a_table_and_copies_keep_their_viewsfail on main too, unrelated.@Marvisak on GitHub · 2026-11-25 00:23 UTC · original · edited 2026-11-25 03:25 UTC
Automated triage for the maintainers.
Needs work. The head is unchanged since the last note.
crates/victory-gpu/src/list.rsstill has two changes:mesh_groupsfix to directDispatchMesh. It is now also in #2014, which carries it alone.DispatchMeshXgoes throughState::execute_indirectas kind 10, stride 12, one record.Part 2 still rests on an inferred argument layout, and no one has shown it running; the Windows tester above reports that the sampled scene never calls
DispatchMeshXwith an indirect address. To change the verdict, this needs evidence of the buffer layout at that call (the title's code that fills it, or buffer contents seen at that call). Once #2014 lands, please also rebase somesh_groupsis not carried twice.CI:
checkfailed on the old base (70564ae), invictory-shadertests this PR does not touch. A rebase will re-run it.On your reply: thanks for the split and the cleaned-up description. Without the evidence this can stay open, but it can't be merged yet.
Generated by Claude Code
@artor410 on GitHub · 2026-11-25 03:07 UTC · original
Split the
mesh_groupsfix into #2014. I can't supplyDispatchMeshXbuffer evidence (no game files here), so this stays open for someone with the title to confirm the layout; staleVICTORY_INDIRECTmentions removed from the description.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.