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

Closed
opened 2026-11-27 13:54:35 +00:00 by github-bot · 3 comments
Owner

@⁠tiagonogueiraa-bit on GitHub · 2026-11-27 13:46 UTC · original

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 #344 (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** on GitHub · 2026-11-27 13:46 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/353) `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 #344 (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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 13:54:35 +00:00
Author
Owner

@⁠tiagonogueiraa-bit on GitHub · 2026-11-27 13:46 UTC · original

/claim

**@⁠tiagonogueiraa-bit** on GitHub · 2026-11-27 13:46 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/353#issuecomment-7219936762) /claim
Author
Owner

@⁠github-actions[bot] on GitHub · 2026-11-27 13:47 UTC · original

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

**@⁠github-actions[bot]** on GitHub · 2026-11-27 13:47 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/353#issuecomment-7219940360) Claimed by @⁠tiagonogueiraa-bit. Open a draft pull request with `Refs #353` in its description within 24 hours, or the claim expires.
Author
Owner

@⁠LakshanSivakumar on GitHub · 2026-11-28 00:35 UTC · original

Thank you. DispatchMesh and DispatchMeshX without an argument address now run, through the same pipeline check the indirect form uses (#357, 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 #344 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.

**@⁠LakshanSivakumar** on GitHub · 2026-11-28 00:35 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/353#issuecomment-7231039000) Thank you. DispatchMesh and DispatchMeshX without an argument address now run, through the same pipeline check the indirect form uses (#357, 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 #344 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.
This discussion has been locked. Commenting is limited to contributors.
No description provided.