Indirect DispatchMeshX is dropped #290

Closed
opened 2026-11-27 09:03:28 +00:00 by github-bot · 3 comments
Owner

@⁠m0rff on GitHub · 2026-11-27 09:01 UTC · original

DispatchMeshX(x, flags, indirect, payload) (list method 0x310) with a non-zero argument address is thrown away on both hosts:

  • D3D12 host: crates/victory-gpu/src/list.rs, state::dispatch_mesh_x, returns after warning once with "indirect mesh dispatches dropped".
  • Native (Metal) host: method 0x310 goes to the count-only draw stub, so nothing is logged. Direct mesh dispatches (0x3f8 and 0x310 with no address) are dropped the same way, and the mesh / mesh_indirect counters in "native draws so far" stay at 0.

ROADMAP section 5 lists it: "Mesh-shader pipelines: indirect mesh dispatches still drop."

Plan: run an indirect DispatchMeshX as a one-record mesh ExecuteIndirect, through the paths both hosts already have (State::execute_indirect kind 10; glue::execute_indirect with Command::DispatchMesh). GPU addresses are title addresses, so the argument address is used unchanged. Guess, to be marked in the code and docs/native-host.md: the record is D3D12_DISPATCH_MESH_ARGUMENTS (12 bytes) and x is unused when the address is set. On the native host, direct mesh dispatches stay dropped, but they are counted and warned once.

Not known to be related to #258 (there the mesh records come through ExecuteIndirect and hold zero counts upstream of the draw).

**@⁠m0rff** on GitHub · 2026-11-27 09:01 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/290) `DispatchMeshX(x, flags, indirect, payload)` (list method 0x310) with a non-zero argument address is thrown away on both hosts: - D3D12 host: `crates/victory-gpu/src/list.rs`, `state::dispatch_mesh_x`, returns after warning once with "indirect mesh dispatches dropped". - Native (Metal) host: method 0x310 goes to the count-only `draw` stub, so nothing is logged. Direct mesh dispatches (0x3f8 and 0x310 with no address) are dropped the same way, and the `mesh` / `mesh_indirect` counters in "native draws so far" stay at 0. ROADMAP section 5 lists it: "Mesh-shader pipelines: indirect mesh dispatches still drop." **Plan:** run an indirect `DispatchMeshX` as a one-record mesh `ExecuteIndirect`, through the paths both hosts already have (`State::execute_indirect` kind 10; `glue::execute_indirect` with `Command::DispatchMesh`). GPU addresses are title addresses, so the argument address is used unchanged. Guess, to be marked in the code and `docs/native-host.md`: the record is `D3D12_DISPATCH_MESH_ARGUMENTS` (12 bytes) and `x` is unused when the address is set. On the native host, direct mesh dispatches stay dropped, but they are counted and warned once. Not known to be related to #258 (there the mesh records come through `ExecuteIndirect` and hold zero counts upstream of the draw).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 09:03:28 +00:00
Author
Owner

@⁠m0rff on GitHub · 2026-11-27 09:01 UTC · original

/claim

**@⁠m0rff** on GitHub · 2026-11-27 09:01 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/290#issuecomment-7214192753) /claim
Author
Owner

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

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

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

@⁠m0rff on GitHub · 2026-11-27 10:47 UTC · original

Done in #291 (merged).

**@⁠m0rff** on GitHub · 2026-11-27 10:47 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/290#issuecomment-7216307675) Done in #291 (merged).
This discussion has been locked. Commenting is limited to contributors.
No description provided.