runtime: forward Xbox DispatchL2 command signatures #3881

Manually merged
github merged 2 commits from github-bot/gh-3879 into gh-pr/3879/base 2026-12-02 23:09:54 +00:00 AGit
Owner

@⁠lambirou on GitHub · 2026-12-02 18:26 UTC · original
lambirou:runtime/dispatch-l2 → main · +106 −5 · 4 files · 2 commits · merged 2026-12-02 23:07 UTC

Problem

The title creates an Xbox indirect command signature with console argument type 0x69 (DispatchL2).
Its record is the 12-byte desktop Dispatch record plus a console flags word that desktop D3D12 does not
have, so CreateCommandSignature failed and the stand-in answered with a placeholder signature that
refused every dispatch.

Change

  • Device slot 41 recognises a single 0x69 argument with the Dispatch stride and translates it to
    D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH, recording the signature as a dispatch of 12 bytes.
  • Forwarding is limited to the flags value the title uses: the bytes after Type must all be zero.
    Any non-zero flag keeps the placeholder signature, so the dispatch is refused by name and leaves the
    target unchanged.
  • The fixture adds a positive DispatchL2 execution and a control that creates a 0x69 signature with
    flag 1, executes it, and checks the target stays unchanged.

Validation

ctest --test-dir out/build/dev --no-tests=error -j 1 -R '^startup_indirect_(dispatch|count_split)_(warp|hardware)$'

4/4 passed on WARP and on the RX 9060 XT. The Windows CI job replays the same selectors.

**@⁠lambirou** on GitHub · 2026-12-02 18:26 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3879) `lambirou:runtime/dispatch-l2` → `main` · +106 −5 · 4 files · 2 commits · merged 2026-12-02 23:07 UTC ## Problem The title creates an Xbox indirect command signature with console argument type `0x69` (`DispatchL2`). Its record is the 12-byte desktop Dispatch record plus a console flags word that desktop D3D12 does not have, so `CreateCommandSignature` failed and the stand-in answered with a placeholder signature that refused every dispatch. ## Change - Device slot 41 recognises a single `0x69` argument with the Dispatch stride and translates it to `D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH`, recording the signature as a dispatch of 12 bytes. - Forwarding is limited to the flags value the title uses: the bytes after `Type` must all be zero. Any non-zero flag keeps the placeholder signature, so the dispatch is refused by name and leaves the target unchanged. - The fixture adds a positive DispatchL2 execution and a control that creates a `0x69` signature with flag `1`, executes it, and checks the target stays unchanged. ## Validation ``` ctest --test-dir out/build/dev --no-tests=error -j 1 -R '^startup_indirect_(dispatch|count_split)_(warp|hardware)$' ``` 4/4 passed on WARP and on the RX 9060 XT. The Windows CI job replays the same selectors.
Refs #870, #1759. The GDK identifies console argument type 105 as DISPATCH_L2: a 12-byte Dispatch record with flags in the signature descriptor. Slot 41 now creates the desktop Dispatch signature instead of a placeholder; other unknown console types remain placeholders. Source-built WARP and hardware tests cover the result and the unknown-type control.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 19:11:32 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-12-02 19:11 UTC · original · requested changes

Independent MSVC Debug ctest --preset dev --no-tests=error -V -j 1 -R '^startup_indirect_(dispatch|count_split)_(warp|hardware)$' passed 4/4 on Windows 11 build 26300, WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656 with the debug layer enabled. Type 105 executed and returned the expected fenced result. The matcher also accepts every flag value in the argument descriptor and drops those flags. The fixture uses a zero-initialized descriptor. Please state the flag value from the observation, restrict forwarding to flags whose behavior desktop Dispatch preserves, and add a control showing the unsupported flag case leaves the target unchanged.

**@⁠R0Y00** on GitHub · 2026-12-02 19:11 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3879#pullrequestreview-6157145747) · **requested changes** Independent MSVC Debug `ctest --preset dev --no-tests=error -V -j 1 -R '^startup_indirect_(dispatch|count_split)_(warp|hardware)$'` passed 4/4 on Windows 11 build 26300, WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656 with the debug layer enabled. Type 105 executed and returned the expected fenced result. The matcher also accepts every flag value in the argument descriptor and drops those flags. The fixture uses a zero-initialized descriptor. Please state the flag value from the observation, restrict forwarding to flags whose behavior desktop Dispatch preserves, and add a control showing the unsupported flag case leaves the target unchanged.
The captured title asks for flags 0 in the console argument descriptor and desktop Dispatch preserves that record. A non-zero flag now keeps the placeholder signature, and a new control executes it to show the target stays unchanged.

Refs #1759
github-bot changed target branch from main to gh-pr/3879/base 2026-12-02 23:09:52 +00:00
github manually merged commit ad9f5a207d into gh-pr/3879/base 2026-12-02 23:09:54 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-12-02 23:07 UTC · original · approved these changes

The previous flag finding is resolved on ad9f5a20. Only the captured zero-flag, single 12-byte DispatchL2 record is forwarded. The new nonzero-flag fixture stays on the placeholder path and leaves the fenced result at 0x31415926. I independently ran Windows 11 build 26300 / MSVC Debug ctest --preset dev --no-tests=error -V -j 1 -R '^startup_indirect_(dispatch|count_split)_(warp|hardware)$': 4/4 passed on inbox WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656, debug layer enabled. Flipping only if (raw[i]) return false to return true built, then failed both dispatch tests with 0x31415f02 instead of 0x31415926. Restoring the source returned 4/4. GitHub Windows, Linux Python and gfx1013 checks passed, and the trial merge with main 517854f0 is clean.

**@⁠R0Y00** on GitHub · 2026-12-02 23:07 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3879#pullrequestreview-6160646381) · **approved these changes** The previous flag finding is resolved on `ad9f5a20`. Only the captured zero-flag, single 12-byte DispatchL2 record is forwarded. The new nonzero-flag fixture stays on the placeholder path and leaves the fenced result at `0x31415926`. I independently ran Windows 11 build 26300 / MSVC Debug `ctest --preset dev --no-tests=error -V -j 1 -R '^startup_indirect_(dispatch|count_split)_(warp|hardware)$'`: 4/4 passed on inbox WARP `10.0.26100.9818` and RTX 4060 Laptop `32.0.16.1656`, debug layer enabled. Flipping only `if (raw[i]) return false` to `return true` built, then failed both dispatch tests with `0x31415f02` instead of `0x31415926`. Restoring the source returned 4/4. GitHub Windows, Linux Python and gfx1013 checks passed, and the trial merge with `main` `517854f0` is clean.
This discussion has been locked. Commenting is limited to contributors.
No description provided.