GPU: forward all direct mesh dispatch group counts #2624
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!2624
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2624"
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?
@andrewpozdnakov7-jpg on GitHub · 2026-11-25 17:02 UTC · original
andrewpozdnakov7-jpg:codex1/mesh-dispatch-dimensions→main· +204 −13 · 3 files · 4 commits · draftDirect List6 DispatchMesh forwards only X and substitutes 1 for Y and Z. For example, a 2 × 3 × 4 dispatch launches two groups. Forward the three group counts. Direct DispatchMeshX still supplies a one-dimensional grid. D3D12 mesh dispatch
The regression records the calls through VIctory's list vtable. A native D3D12 pipeline-statistics query counts invocations of a synthetic one-thread mesh shader on WARP. The fixture locates the entry points in the active guest list layout.
63bcca422f5207The same test failed six times on main and passed each time with the patch. The full WARP GPU suite passed with 247 tests and one ignored under both D3D12 debug settings. Strict GPU Clippy in both configurations and repository policy passed. The project shader emitter generates the synthetic shader in-process. The test needs a host with mesh pipeline statistics. AI-assisted. Synthetic tests only.
The patch leaves indirect DispatchMeshX to #1546 and #1749. #24 also edits direct dispatch and would need a conflict resolution in list.rs.
Coordination claim
Please preserve the Git author when reapplying the change. If you fold the code or test into another commit, please add this trailer.
Co-authored-by: andrewpozdnakov7-jpg [email protected]
@Bj0rnis on GitHub · 2026-11-25 17:32 UTC · original
Independent Windows 11 hardware + WARP verification of #2624 at
827fbf89(cleangit merge-treewithorigin/main13f91cae, Rust 1.98.1 MSVC):cargo test -p victory-gpu --features diagnostics --lib --locked -- --test-threads=1-> 197 passed, 2 failed, 1 ignored (2.89s; includes the new test, only the 2 pre-existing #1744 NVIDIA 1M view-heap baseline failures also present onmain13f91cae).VICTORY_D3D12_WARP=1): 199 passed, 0 failed, 1 ignored (1.76s).cargo clippy -p victory-gpu --all-targets --all-features --locked -- -D warnings-> 0 warnings.cargo xtask policy-> 184 files ok.Not tested: live game workload.
AI-assisted test run and summary.
@kotekompotek on GitHub · 2026-11-25 17:45 UTC · original
Reviewed: forwards the real (x, y, z) to
DispatchMeshinstead of forcing 1x1, indirect path keeps (x,1,1) as before. The old once-warn on y*z!=1 is correctly gone since it now works. CI green.@Marvisak on GitHub · 2026-11-25 22:15 UTC · original · edited 2026-11-26 03:23 UTC
Automated triage for the maintainers.
Verdict: merge candidate (changed from needs work). Re-reviewed at
22f5207, which merges cleanly intomain. The fix is unchanged:State::dispatch_meshincrates/victory-gpu/src/draw.rspasses the caller'sx, y, ztoDispatchMesh, the List6dispatch_meshinlist.rsforwards all three, and the directDispatchMeshXpath keeps(x, 1, 1).On your reply: confirmed.
direct_mesh_dispatch_uses_all_group_countsincrates/victory-gpu/src/pipeline/host.rsnow builds a one-thread synthetic mesh program (s_endpgmonly) through the crate's ownir/structure/emitpath. It no longer writes HLSL or spawnsdxc.exe, and reads no environment variable, which was the only reason for the previous verdict. It skips cleanly where mesh shaders or mesh pipeline statistics are unavailable. The expectedMSInvocations[2, 6, 8, 24, 0, 2]match the group grids it dispatches.CI: passing (
check).Generated by Claude Code
@andrewpozdnakov7-jpg on GitHub · 2026-11-25 22:39 UTC · original
I resolved the test-module conflict in 14c1fc2. The mesh-dispatch test and the new upstream test both pass.
The same six guest vtable calls on
f3578e3report[2, 2, 2, 2, 2, 2]mesh shader invocations. The updated branch reports[2, 6, 8, 24, 0, 2]. This covers the X-only and Xbox calls and the Y, Z and zero-axis controls. Six paired WARP runs, both serial GPU suites at 244 passed and one ignored, strict Clippy, and asset policy passed.Please retain the Git author on cherry-pick or rebase. If folding the fix or test into another commit, please add this trailer.
Co-authored-by: andrewpozdnakov7-jpg [email protected]
@andrewpozdnakov7-jpg on GitHub · 2026-11-25 22:59 UTC · original
Updated this branch after #158 changed the command-list table tests. Commit
498b5c1df87242b38731cf1137574abe83dc0941retains the previous tested head and uses the table that belongs to the test list to locate the guest dispatch entry points.The same WARP statistics test on base
842b0cb76f8f5fa9289bd779783c51ec24d75302reports[2, 2, 2, 2, 2, 2]; with the patch it checks[2, 6, 8, 24, 0, 2]. Both upstream depth-bounds tests also pass. Full GPU suite: 247 passed, 1 ignored, with each D3D12 debug setting. Strict GPU Clippy in both configurations and asset policy passed.If you cherry-pick the fix or test, please preserve the Git author. If you fold the work into another commit, please include
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.@andrewpozdnakov7-jpg on GitHub · 2026-11-26 00:49 UTC · original
22f5207 addresses the test review. The fixture builds a one-thread synthetic mesh shader with VIctory's in-process shader emitter. It binds a guest view heap through the list vtable and uses the normal sampler fallback. The dispatch fix and statistics query are unchanged.
In six paired Windows/WARP runs with the same fixture and no external compiler,
63bcca43c6a00a758510398fa43096ce7e4f7df0reported[2, 2, 2, 2, 2, 2]and the updated head reported[2, 6, 8, 24, 0, 2]. Both depth-bounds tests pass. Full WARP GPU suite, 247 passed and one ignored under each D3D12 debug setting. Strict GPU Clippy in both configurations and asset policy passed.Please retain the Git author on cherry-pick. If folding the fix or test into another commit, please include
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.@andrewpozdnakov7-jpg on GitHub · 2026-11-26 03:59 UTC · original
I found a correctness problem in this head that the pipeline-statistics test cannot see. I am putting this PR back in draft.
I ran the same one-thread translated mesh program on
63bcca4and22f5207. It reads the guest mesh-group input and atomically increments that group's counter. The guest List6 command recorded DispatchMesh(3, 2, 4), and the submitted WARP work produced:63bcca422f5207Input::MeshGroupmultipliesSV_GroupID.xby the mesh stride. The extra Y/Z groups therefore revisit the first three indices and leave the other 21 counters untouched. This is the same lowering interaction caught in #2996's indirect path. The per-axis D3D12 bound also means a single X-only call cannot cover every valid direct grid. The D3D12 specification defines the host limit. We still need the direct guest mesh-group numbering for a multi-axis call or an implementation that carries the grid dimensions all the way to lowering and can be checked against that contract.AI-assisted with Codex. Synthetic Windows/WARP tests.
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.