Direct mesh dispatches (DispatchMesh, DispatchMeshX without an argument address) are dropped on the native host #353

Closed
opened 2026-11-27 13:46:53 +00:00 by tiagonogueiraa-bit · 3 comments
tiagonogueiraa-bit commented 2026-11-27 13:46:53 +00:00 (Migrated from github.com)
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by tiagonogueiraa-bit on 2026-11-27T13:46:53Z.


docs/ROADMAP.md (section 5) lists this as open: on the native host, direct mesh dispatches are still dropped.

What happens.

  • DispatchMesh (method slot 0x3f8) is routed to dropped_mesh.
  • DispatchMeshX (0x310) with no argument address goes to dropped_mesh_x.
  • Both only count the drop (mesh= on the "native draws so far" line) and warn once: native host drops work: a mesh dispatch.
  • The indirect form already runs, through glue::execute_indirect → NativeList::dispatch_mesh_indirect. NativeList::dispatch_mesh(x, y, z) exists too, and mesh_tests uses it, but nothing on the title path calls it. list.rs marks it as a shortcut: "route them to MetalList::dispatch_mesh when a mesh pipeline needs them".

How often. The log attached to #343 (M3 Pro, Series S, c5d7f4d0) shows mesh=0 through frame 1984, and mesh=5 at frame 2048 in the prologue. So it is rare, but it happens in the world, and each one is a mesh draw that never runs.

Plan.

  • Run both direct forms the way the indirect one runs: the same glue::graphics(.., mesh = true) pipeline check, then dispatch_mesh(x, y, z). Like the D3D12 host's dispatch_mesh_x, DispatchMeshX takes x groups, and flags and payload are ignored. That is a guess, marked as one.
  • A dispatch with no mesh pipeline stays dropped, and is counted as now.
  • Add a GPU test through the method table, like an_indirect_dispatch_mesh_x_draws_the_groups_its_record_holds: one group colours the target, and zero groups draw nothing.
<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:issue:6647691540 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/353). Originally posted by [tiagonogueiraa-bit](https://github.com/tiagonogueiraa-bit) on 2026-11-27T13:46:53Z. --- `docs/ROADMAP.md` (section 5) lists this as open: on the native host, direct mesh dispatches are still dropped. **What happens.** - `DispatchMesh` (method slot 0x3f8) is routed to `dropped_mesh`. - `DispatchMeshX` (0x310) with no argument address goes to `dropped_mesh_x`. - Both only count the drop (`mesh=` on the "native draws so far" line) and warn once: `native host drops work: a mesh dispatch`. - The indirect form already runs, through `glue::execute_indirect` → `NativeList::dispatch_mesh_indirect`. `NativeList::dispatch_mesh(x, y, z)` exists too, and `mesh_tests` uses it, but nothing on the title path calls it. `list.rs` marks it as a shortcut: "route them to `MetalList::dispatch_mesh` when a mesh pipeline needs them". **How often.** The log attached to #343 (M3 Pro, Series S, c5d7f4d0) shows `mesh=0` through frame 1984, and `mesh=5` at frame 2048 in the prologue. So it is rare, but it happens in the world, and each one is a mesh draw that never runs. **Plan.** - Run both direct forms the way the indirect one runs: the same `glue::graphics(.., mesh = true)` pipeline check, then `dispatch_mesh(x, y, z)`. Like the D3D12 host's `dispatch_mesh_x`, `DispatchMeshX` takes `x` groups, and flags and payload are ignored. That is a guess, marked as one. - A dispatch with no mesh pipeline stays dropped, and is counted as now. - Add a GPU test through the method table, like `an_indirect_dispatch_mesh_x_draws_the_groups_its_record_holds`: one group colours the target, and zero groups draw nothing.
tiagonogueiraa-bit commented 2026-11-27 13:46:54 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by tiagonogueiraa-bit on 2026-11-27T13:46:54Z.


/claim

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7219936762 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/353#issuecomment-7219936762). Originally posted by [tiagonogueiraa-bit](https://github.com/tiagonogueiraa-bit) on 2026-11-27T13:46:54Z. --- /claim
github-actions[bot] commented 2026-11-27 13:47:05 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-27T13:47:05Z.


Claimed by @tiagonogueiraa-bit. Open a draft pull request with Refs #353 in its description within 24 hours, or the claim expires.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7219940360 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/353#issuecomment-7219940360). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-27T13:47:05Z. --- Claimed by @tiagonogueiraa-bit. Open a draft pull request with `Refs #353` in its description within 24 hours, or the claim expires.
LakshanSivakumar commented 2026-11-28 00:35:51 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-28T00:35:51Z.


Thank you. DispatchMesh and DispatchMeshX without an argument address now run, through the same pipeline check the indirect form uses (#354, on main). DispatchMeshX runs [x, 1, 1] groups; that is a guess about the console and it is marked in the code. I saw no game run with the direct dispatches (mesh=5 in the #343 log), so I do not know how many draws it gives back. Closing; please reopen if mesh= still grows on a6a58361 with "native host drops work: a mesh dispatch" in the log.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7231039000 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/353#issuecomment-7231039000). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-28T00:35:51Z. --- Thank you. DispatchMesh and DispatchMeshX without an argument address now run, through the same pipeline check the indirect form uses (#354, on main). DispatchMeshX runs [x, 1, 1] groups; that is a guess about the console and it is marked in the code. I saw no game run with the direct dispatches (mesh=5 in the #343 log), so I do not know how many draws it gives back. Closing; please reopen if `mesh=` still grows on a6a58361 with "native host drops work: a mesh dispatch" in the log.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
LakshanSivakumar/Native-Victory-macOS#353
No description provided.