native: run direct mesh dispatches (#353) #357
No reviewers
Labels
No labels
accessibility
bug
claimed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
tester report
urgent
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LakshanSivakumar--Native-Victory-macOS!357
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-354"
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?
@tiagonogueiraa-bit on GitHub · 2026-11-27 13:49 UTC · original
tiagonogueiraa-bit:native-direct-mesh→main· +96 −15 · 5 files · 1 commits · merged 2026-11-27 16:14 UTCRefs #356
What was wrong. On the native host,
DispatchMesh(method 0x3f8) andDispatchMeshXwith no argument address were dropped. They were only counted in the frame line'smesh=and warned about once. The indirect form already ran.docs/ROADMAP.mdlisted the direct form as open. The log attached to #344 (M3 Pro, Series S, prologue) showsmesh=5by frame 2048: rare, but they are world draws that never ran.Change.
glue::dispatch_mesh. It does what the indirect branch ofglue::execute_indirectdoes: it checks the bound pipeline withgraphics(.., mesh = true), then encodesNativeList::dispatch_mesh(x, y, z). It also counts the dispatch as recorded and encoded, and updates the target trace and the pass note.DispatchMeshXruns[x, 1, 1]groups, the same guess the D3D12 host'sdispatch_mesh_xmakes.flagsandpayloadare ignored. The guess is written up next to the existing one indocs/native-host.md.graphicslogs: no pipeline, "a mesh dispatch of a vertex pipeline", or a guessed mesh pipeline. It is still counted inmesh=, so that field keeps its meaning: direct mesh dispatches the host did not run.dropped_meshis gone, anddropped_mesh_xnow handles only indirect dispatches that could not run.Tests (GPU, through the method table, built on
an_indirect_dispatch_mesh_x_draws_the_groups_its_record_holds):a_direct_dispatch_mesh_x_draws_its_groups: one group colours the target, zero groups leave it black, and neither is counted as dropped.a_direct_dispatch_mesh_draws_its_groups:DispatchMesh(1, 1, 1)colours the target.Both fail on main (the target stays black) and pass with this change.
Checks (macOS 27.2, Metal Shader Converter 4.0 beta 3):
cargo test -p victory-hle -p victory -p victory-gpu -p victory-metal -p xtask: 581 passed, 0 failed, 7 ignored.cargo clippy --workspace --all-targets --target x86_64-pc-windows-gnullvm -- -D warnings: clean.cargo xtask policy: ok.I haven't checked this in a game run. The next tester log should show
mesh=at 0, or only the dispatches that have no mesh pipeline.@LakshanSivakumar on GitHub · 2026-11-27 16:15 UTC · original
Merged in
4cf84c83. Before pushing I ran the tests (native arm64), Windows clippy, the policy check, a release build, and one headless game run of the exact tree (170 s, Series S): menus at 30 fps, the world entered at about 81 s and kept presenting to the end at about 1 frame a second, 0 GPU errors, no crash. Thanks.