d3d12_xs: command-queue slot 35 is the console's ExecuteCommandLists (RT-QUEUE35) #391

Manually merged
github merged 2 commits from gh-pr/391/head into gh-pr/391/base 2026-11-26 08:57:24 +00:00
Owner

@⁠Mumogg on GitHub · 2026-11-24 04:26 UTC · original
Mumogg:queue-slot35-execute → main · +139 −19 · 4 files · 2 commits · merged 2026-11-24 23:49 UTC

Claimed in #14 as RT-QUEUE35. Depends on: #349, #350, #356, #362, #369, #375, #377, #383, #385 (their commits come first here; this pull request is the last commit). The code itself only touches the queue proxy; the dependency is the measurement.

What and why

On the retail title, command-queue slot 35 is ExecuteCommandLists(count, lists). It is past the PC queue's 19 slots, so main refuses it with E_NOTIMPL; nothing is submitted and the title faults a little later.

Commit e925b6345 by Vadson159 (old PR 7286; cherry-picked with -x, authorship kept) routes the slot to the PC ExecuteCommandLists (slot 10), with the count taken as a UINT. Unlike the other pieces I have sent, this one is neither in main's history nor among the old-pr/* branches; I had it locally from the original pull request.

Adapted to main, as the commit message says:

  • main hands the title command-list proxies. The commit's shared execute function passed the array on as it came, which also took the PC slot 10 through that path and made xs_proxy_mock_test's existing slot 10 case fail (the real queue got a proxy). The function now replaces list proxies by their real lists in a copy of the array (UnwrappedArray), for both slots.
  • The commit's mock case for slot 35 passed two numbers as lists. Since the array is now read, it passes two mock lists and checks that they arrive and that the caller's array is not written.

Measured

Linux (Nobara 44, kernel 7.3), Wine 11.21 staging, RTX 5070 Ti (driver 615.78.08), clang-cl 22.1.8 + xwin SDK 10.0.26100, own 1.0.2.1 copy, network off, on main ece4ba5b3, with #142, #219, #328 and #387 applied on top for the boot runs (they are not in this branch).

--run Last traced calls
without this XboxID3D12CommandQueue::Slot35 unsupported
with this XboxID3D12CommandQueue::ExecuteCommandListsX called, then ID3D12CommandQueue::ExecuteCommandLists ok

That is the first command-list submission on this path. The run still ends in the same place, an access violation in the title writing through a null pointer, so slot 35 was not what caused it. The call just before the submission that is still refused is command-allocator slot 9 (XboxID3D12CommandAllocator::Slot9 unsupported), which on the console hands out upload memory. That is the next thing to look at, and it is not a small cherry-pick: it belongs to the console command-list work of old PR 2490, which main has in a different shape.

Tests under Wine: xs_proxy_mock_test passes (the slot 10 case and the adapted slot 35 case), queue_proxy_test passes on the Vulkan backend (1 backend(s) passed).

Not built with MSVC and not run on Windows.

AI-assisted (Claude Code); built and run on the machine above.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt

**@⁠Mumogg** on GitHub · 2026-11-24 04:26 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/391) `Mumogg:queue-slot35-execute` → `main` · +139 −19 · 4 files · 2 commits · merged 2026-11-24 23:49 UTC Claimed in #14 as `RT-QUEUE35`. Depends on: #349, #350, #356, #362, #369, #375, #377, #383, #385 (their commits come first here; this pull request is the last commit). The code itself only touches the queue proxy; the dependency is the measurement. ### What and why On the retail title, command-queue slot 35 is `ExecuteCommandLists(count, lists)`. It is past the PC queue's 19 slots, so `main` refuses it with `E_NOTIMPL`; nothing is submitted and the title faults a little later. Commit `e925b6345` by Vadson159 (old PR 7286; cherry-picked with `-x`, authorship kept) routes the slot to the PC `ExecuteCommandLists` (slot 10), with the count taken as a `UINT`. Unlike the other pieces I have sent, this one is neither in `main`'s history nor among the `old-pr/*` branches; I had it locally from the original pull request. Adapted to `main`, as the commit message says: - `main` hands the title command-list proxies. The commit's shared execute function passed the array on as it came, which also took the PC slot 10 through that path and made `xs_proxy_mock_test`'s existing slot 10 case fail (the real queue got a proxy). The function now replaces list proxies by their real lists in a copy of the array (`UnwrappedArray`), for both slots. - The commit's mock case for slot 35 passed two numbers as lists. Since the array is now read, it passes two mock lists and checks that they arrive and that the caller's array is not written. ### Measured Linux (Nobara 44, kernel 7.3), Wine 11.21 staging, RTX 5070 Ti (driver 615.78.08), clang-cl 22.1.8 + xwin SDK 10.0.26100, own 1.0.2.1 copy, network off, on `main` `ece4ba5b3`, with #142, #219, #328 and #387 applied on top for the boot runs (they are not in this branch). | `--run` | Last traced calls | |---|---| | without this | `XboxID3D12CommandQueue::Slot35 unsupported` | | with this | `XboxID3D12CommandQueue::ExecuteCommandListsX called`, then `ID3D12CommandQueue::ExecuteCommandLists ok` | That is the first command-list submission on this path. The run still ends in the same place, an access violation in the title writing through a null pointer, so slot 35 was not what caused it. The call just before the submission that is still refused is command-allocator slot 9 (`XboxID3D12CommandAllocator::Slot9 unsupported`), which on the console hands out upload memory. That is the next thing to look at, and it is not a small cherry-pick: it belongs to the console command-list work of old PR 2490, which `main` has in a different shape. Tests under Wine: `xs_proxy_mock_test` passes (the slot 10 case and the adapted slot 35 case), `queue_proxy_test` passes on the Vulkan backend (`1 backend(s) passed`). Not built with MSVC and not run on Windows. AI-assisted (Claude Code); built and run on the machine above. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt
(cherry picked from commit e925b63455)

Adapted to main by Mumogg: main has command-list proxies, so the shared execute function replaces them by their
real lists in a copy of the array (UnwrappedArray), for the console slot 35 as for the PC slot 10, whose test
failed otherwise. The slot 35 mock case passes two mock lists instead of two numbers and checks that they arrive
and that the caller's array is not written.
Two files conflicted; in each, both sides had added something at the same
place and both are kept.

runtime/shims/d3d12_xs_device.cpp: this branch's
queue_execute_command_lists() next to main's XboxQueueSlotRoutes and
xbox_queue_slot_routes() (the PresentX, SuspendX and ResumeX routes).

runtime/test/xs_proxy_mock_test.cpp: main() runs check_xbox_queue_slots()
and then check_presentation_wiring().

Co-Authored-By: Claude Fable 5.2 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:57:18 +00:00
github-bot referenced this pull request from a commit 2026-11-26 08:57:23 +00:00
github manually merged commit 94c9e43154 into gh-pr/391/base 2026-11-26 08:57:24 +00:00
github-bot referenced this pull request from a commit 2026-11-26 08:57:40 +00:00
Author
Owner

@⁠aslan2142 on GitHub · 2026-11-24 23:49 UTC · original

Merged. Mumogg is still away and this is the next rung on main's boot path, so I brought the branch up to date as with the rungs before it: one merge commit of main (507029d1e) on top of 1bd72a87a (94c9e4315). Mumogg's commit is untouched and nothing was force-pushed.

What it does: queue slot 35 is the console's ExecuteCommandLists(count, lists). The proxy forwards it to the PC slot 10 with a 32-bit count; list proxies are replaced by their real lists in a copy of the array, for slot 35 and slot 10 alike. Before, slot 35 was refused as past the PC queue table.

Conflicts: two files, each because both sides had added something at the same place; both are kept.

  • runtime/shims/d3d12_xs_device.cpp: this branch's queue_execute_command_lists() next to main's XboxQueueSlotRoutes / xbox_queue_slot_routes().
  • runtime/test/xs_proxy_mock_test.cpp: main() runs check_xbox_queue_slots() and then check_presentation_wiring().

The diff of the merge against main holds only this PR's four files.

Holds and requests: none on this PR. The owner's hold on the stack was the ExecuteIndirect regression, resolved before #377 was merged.

Tests (clang-cl with the xwin SDK; Wine, headless; llvmpipe and an RDNA2 iGPU):

  • Full Windows suite under Wine, the branch against main 507029d1e: no test went from pass to fail on either device (259 pass and 15 fail on llvmpipe, 255 and 21 on the iGPU). The one difference is d3d12_queue_handover_two_queues on llvmpipe, which had failed once in the baseline run under load and passes here; it also passes when run alone on main.
  • queue_proxy, xs_proxy_mock with its six variants and device_proxy pass on both devices.
  • check_no_game_data.py on the four files is clean. The Linux portable subset does not build these files.
  • Not run here: MSVC, native Windows, and the game itself.

Follow-ups, none blocking the boot path:

  • A LEONIDA_XS_PRESENT_X_SLOT, ..._SUSPEND_X_SLOT or ..._RESUME_X_SLOT set to 35 is silently ignored, because the fixed handler runs first. The device side does the opposite: there a configured route wins.
  • The header text this PR brings says PresentX/SuspendX/ResumeX "remain refused until measured and implemented", which contradicts main's presenter routes described further down in the same header.
  • There is no row for queue slot 35 in docs/d3d12_vulkan.md.
  • Kokonotcu's finding in #14 (#14): after this, the title's queue slot 16 Signal(fence, n) reaches the PC GetTimestampFrequency. That is #430.

#395 (allocator slot 9) is the next rung.

AI-assisted (Claude Code, Claude Fable 5.2 and Claude Opus 5.5).

**@⁠aslan2142** on GitHub · 2026-11-24 23:49 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/391#issuecomment-7147838869) Merged. Mumogg is still away and this is the next rung on `main`'s boot path, so I brought the branch up to date as with the rungs before it: one merge commit of `main` (`507029d1e`) on top of `1bd72a87a` (`94c9e4315`). Mumogg's commit is untouched and nothing was force-pushed. **What it does:** queue slot 35 is the console's `ExecuteCommandLists(count, lists)`. The proxy forwards it to the PC slot 10 with a 32-bit count; list proxies are replaced by their real lists in a copy of the array, for slot 35 and slot 10 alike. Before, slot 35 was refused as past the PC queue table. **Conflicts:** two files, each because both sides had added something at the same place; both are kept. - `runtime/shims/d3d12_xs_device.cpp`: this branch's `queue_execute_command_lists()` next to `main`'s `XboxQueueSlotRoutes` / `xbox_queue_slot_routes()`. - `runtime/test/xs_proxy_mock_test.cpp`: `main()` runs `check_xbox_queue_slots()` and then `check_presentation_wiring()`. The diff of the merge against `main` holds only this PR's four files. **Holds and requests:** none on this PR. The owner's hold on the stack was the `ExecuteIndirect` regression, resolved before #377 was merged. **Tests** (clang-cl with the xwin SDK; Wine, headless; llvmpipe and an RDNA2 iGPU): - Full Windows suite under Wine, the branch against `main` `507029d1e`: no test went from pass to fail on either device (259 pass and 15 fail on llvmpipe, 255 and 21 on the iGPU). The one difference is `d3d12_queue_handover_two_queues` on llvmpipe, which had failed once in the baseline run under load and passes here; it also passes when run alone on `main`. - `queue_proxy`, `xs_proxy_mock` with its six variants and `device_proxy` pass on both devices. - `check_no_game_data.py` on the four files is clean. The Linux portable subset does not build these files. - Not run here: MSVC, native Windows, and the game itself. **Follow-ups, none blocking the boot path:** - A `LEONIDA_XS_PRESENT_X_SLOT`, `..._SUSPEND_X_SLOT` or `..._RESUME_X_SLOT` set to 35 is silently ignored, because the fixed handler runs first. The device side does the opposite: there a configured route wins. - The header text this PR brings says `PresentX`/`SuspendX`/`ResumeX` "remain refused until measured and implemented", which contradicts `main`'s presenter routes described further down in the same header. - There is no row for queue slot 35 in `docs/d3d12_vulkan.md`. - Kokonotcu's finding in #14 (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14): after this, the title's queue slot 16 `Signal(fence, n)` reaches the PC `GetTimestampFrequency`. That is #430. #395 (allocator slot 9) is the next rung. AI-assisted (Claude Code, Claude Fable 5.2 and Claude Opus 5.5).
This discussion has been locked. Commenting is limited to contributors.
No description provided.