d3d12_xs: command-allocator slot 9 (SetAllocatorCallbackX) is recorded, again (RT-ALLOC9) #395

Merged
Mumogg merged 5 commits from upstream-pr/395 into main 2026-11-24 23:59:23 +00:00
Mumogg commented 2026-11-24 04:28:32 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Mumogg on 2026-11-24T04:28:32Z.


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

What and why

The retail title calls command-allocator slot 9 with a function pointer and a context: the console's SetAllocatorCallbackX. It is past the PC allocator's 9 slots, so main refuses it with E_NOTIMPL.

Commit e29e98998 by DevilNine (-x, authorship kept; an ancestor of main whose content is not in the tree) records the callback and its context on the proxy and answers S_OK, leaving slots 10 and up refused. The layer manages its command buffers itself and never calls the callback. The conflict was one neighbour (the queue's slot 35 branch of #391); both sides are kept.

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 Trace line for the call
without this XboxID3D12CommandAllocator::Slot9 unsupported
with this XboxID3D12CommandAllocator::SetAllocatorCallbackX called, and one [rt] line with the recorded words

This does not move the stop. The run ends as with #391 alone: after the first ExecuteCommandLists ok the title faults writing through a null pointer. I thought the refused slot 9 might be the cause and it is not. What differs from a run that goes on is in the console command-list proxy; I posted that as a finding in #14.

So this pull request removes one refused console call from the path and nothing more. It is small and tested, but it can wait for the list work if you prefer to take them together.

Tests under Wine: xs_proxy_mock_test passes; allocator_proxy_test exits 0.

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

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5466090739 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/395). Originally posted by [Mumogg](https://github.com/Mumogg) on 2026-11-24T04:28:32Z. --- Claimed in #14 as `RT-ALLOC9`. Depends on: #349, #350, #356, #362, #369, #375, #377, #383, #385, #391 (their commits come first here; this pull request is the last commit). The code itself only touches the allocator proxy. ### What and why The retail title calls command-allocator slot 9 with a function pointer and a context: the console's `SetAllocatorCallbackX`. It is past the PC allocator's 9 slots, so `main` refuses it with `E_NOTIMPL`. Commit `e29e98998` by DevilNine (`-x`, authorship kept; an ancestor of `main` whose content is not in the tree) records the callback and its context on the proxy and answers `S_OK`, leaving slots 10 and up refused. The layer manages its command buffers itself and never calls the callback. The conflict was one neighbour (the queue's slot 35 branch of #391); both sides are kept. ### 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` | Trace line for the call | |---|---| | without this | `XboxID3D12CommandAllocator::Slot9 unsupported` | | with this | `XboxID3D12CommandAllocator::SetAllocatorCallbackX called`, and one `[rt]` line with the recorded words | **This does not move the stop.** The run ends as with #391 alone: after the first `ExecuteCommandLists ok` the title faults writing through a null pointer. I thought the refused slot 9 might be the cause and it is not. What differs from a run that goes on is in the console command-list proxy; I posted that as a finding in #14. So this pull request removes one refused console call from the path and nothing more. It is small and tested, but it can wait for the list work if you prefer to take them together. Tests under Wine: `xs_proxy_mock_test` passes; `allocator_proxy_test` exits 0. 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
aslan2142 commented 2026-11-24 23:59:25 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-24T23:59:25Z.


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 on top of dfd62d7e2 (b06d096ad), merging main with #391 in it. Mumogg's two commits (DevilNine's change and the docs row) are untouched and nothing was force-pushed.

What it does: command-allocator slot 9, named SetAllocatorCallbackX after the commit that added it, now stores the title's callback and context on the allocator proxy, logs once and answers S_OK; before, it was refused as past the PC allocator table. Slots 10 and up are still refused. This restores DevilNine's e29e98998, which is in main's history but was no longer in its tree.

It is a stand-in: nothing calls the callback, and whether the title needs it called is open. The new row in docs/d3d12_vulkan.md says so.

Conflict: one, in docs/d3d12_vulkan.md: both sides added a row at the same place of the Xbox-only table. Both are kept (allocator slot 9, then slot 81 / PresentX). The code and the tests merged without conflicts; the merge adds exactly this PR's five files to main.

Holds and requests: none on this PR.

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

  • Full Windows suite under Wine, the branch against main with #391: no test changed state on either device (259 pass and 15 fail on llvmpipe, 255 and 21 on the iGPU, on both sides).
  • allocator_proxy, xs_proxy_mock with its six variants and device_proxy pass on both devices.
  • The 12 test_docs_* files and check_no_game_data.py on the changed files are clean.
  • Not run here: MSVC, native Windows, and the game itself. By Mumogg's run the stop does not move with this rung: the title still faults through a null pointer after its first ExecuteCommandLists.

For later: the header comment's "Slot 9 wraps only an allocator…" means device slot 9 and should say so, now that allocator slot 9 is described just above it.

#396 (console list slot 139) is the next rung.

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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7148014970 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/395#issuecomment-7148014970). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-11-24T23:59:25Z. --- 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 on top of `dfd62d7e2` (`b06d096ad`), merging `main` with #391 in it. Mumogg's two commits (DevilNine's change and the docs row) are untouched and nothing was force-pushed. **What it does:** command-allocator slot 9, named `SetAllocatorCallbackX` after the commit that added it, now stores the title's callback and context on the allocator proxy, logs once and answers `S_OK`; before, it was refused as past the PC allocator table. Slots 10 and up are still refused. This restores DevilNine's `e29e98998`, which is in `main`'s history but was no longer in its tree. **It is a stand-in:** nothing calls the callback, and whether the title needs it called is open. The new row in `docs/d3d12_vulkan.md` says so. **Conflict:** one, in `docs/d3d12_vulkan.md`: both sides added a row at the same place of the Xbox-only table. Both are kept (allocator slot 9, then slot 81 / `PresentX`). The code and the tests merged without conflicts; the merge adds exactly this PR's five files to `main`. **Holds and requests:** none on this PR. **Tests** (clang-cl with the xwin SDK; Wine, headless; llvmpipe and an RDNA2 iGPU): - Full Windows suite under Wine, the branch against `main` with #391: no test changed state on either device (259 pass and 15 fail on llvmpipe, 255 and 21 on the iGPU, on both sides). - `allocator_proxy`, `xs_proxy_mock` with its six variants and `device_proxy` pass on both devices. - The 12 `test_docs_*` files and `check_no_game_data.py` on the changed files are clean. - Not run here: MSVC, native Windows, and the game itself. By Mumogg's run the stop does not move with this rung: the title still faults through a null pointer after its first `ExecuteCommandLists`. **For later:** the header comment's "Slot 9 wraps only an allocator…" means device slot 9 and should say so, now that allocator slot 9 is described just above it. #396 (console list slot 139) is the next rung. AI-assisted (Claude Code, Claude Fable 5.2 and Claude Opus 5.5).
Sign in to join this conversation.
No reviewers
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
ProjectLeonida/mandy!395
No description provided.