Indirect DispatchMeshX is dropped #290

Closed
opened 2026-11-27 09:01:29 +00:00 by m0rff · 3 comments
m0rff commented 2026-11-27 09:01:29 +00:00 (Migrated from github.com)
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by m0rff on 2026-11-27T09:01:29Z.


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).

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:issue:6643279015 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/290). Originally posted by [m0rff](https://github.com/m0rff) on 2026-11-27T09:01:29Z. --- `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 commented 2026-11-27 09:01:34 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by m0rff on 2026-11-27T09:01:34Z.


/claim

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7214192753 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/290#issuecomment-7214192753). Originally posted by [m0rff](https://github.com/m0rff) on 2026-11-27T09:01:34Z. --- /claim
github-actions[bot] commented 2026-11-27 09:01:46 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-27T09:01:46Z.


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

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

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by m0rff on 2026-11-27T10:47:24Z.


Done in #291 (merged).

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7216307675 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/290#issuecomment-7216307675). Originally posted by [m0rff](https://github.com/m0rff) on 2026-11-27T10:47:24Z. --- Done in #291 (merged).
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#290
No description provided.