[PR #395] [MERGED] d3d12_xs: command-allocator slot 9 (SetAllocatorCallbackX) is recorded, again (RT-ALLOC9) #447

Closed
opened 2026-11-26 20:17:54 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/395
Author: @Mumogg
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142

Base: main ← Head: allocator-slot9-callback


📝 Commits (5)

  • bbae96d d3d12_xs: handle ID3D12CommandAllocator slot 9 (SetAllocatorCallbackX) on allocator proxy
  • 1bd72a8 d3d12_xs: route command queue slot 35 to ExecuteCommandLists
  • dfd62d7 docs: the recorded, never-called allocator callback of slot 9 has a row in the Xbox-only table
  • 94c9e43 Merge main into RT-QUEUE35 (#391)
  • b06d096 Merge main into RT-ALLOC9 (#395)

📊 Changes

6 files changed (+220 additions, -32 deletions)

View changed files

📝 docs/d3d12_vulkan.md (+1 -0)
📝 runtime/shims/d3d12_xs_device.cpp (+65 -0)
📝 runtime/shims/d3d12_xs_device.h (+17 -9)
📝 runtime/test/allocator_proxy_test.cpp (+24 -7)
📝 runtime/test/queue_proxy_test.cpp (+59 -13)
📝 runtime/test/xs_proxy_mock_test.cpp (+54 -3)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/395 **Author:** [@Mumogg](https://github.com/Mumogg) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/25/2026 **Merged by:** [@aslan2142](https://github.com/aslan2142) **Base:** `main` ← **Head:** `allocator-slot9-callback` --- ### 📝 Commits (5) - [`bbae96d`](https://github.com/ubiquitarianism/leonida/commit/bbae96de2a46e472c5e8627829d17c648b06366e) d3d12_xs: handle ID3D12CommandAllocator slot 9 (SetAllocatorCallbackX) on allocator proxy - [`1bd72a8`](https://github.com/ubiquitarianism/leonida/commit/1bd72a87ada80475d2a51f9eda359906d9962a3f) d3d12_xs: route command queue slot 35 to ExecuteCommandLists - [`dfd62d7`](https://github.com/ubiquitarianism/leonida/commit/dfd62d7e2637f181516cfe14d7cbfd0e6dc0710d) docs: the recorded, never-called allocator callback of slot 9 has a row in the Xbox-only table - [`94c9e43`](https://github.com/ubiquitarianism/leonida/commit/94c9e43154c003acfb0b659104560c58423a7c5d) Merge main into RT-QUEUE35 (#391) - [`b06d096`](https://github.com/ubiquitarianism/leonida/commit/b06d096ad0943d5eda9bf1b17b3c3346688fc1f6) Merge main into RT-ALLOC9 (#395) ### 📊 Changes **6 files changed** (+220 additions, -32 deletions) <details> <summary>View changed files</summary> 📝 `docs/d3d12_vulkan.md` (+1 -0) 📝 `runtime/shims/d3d12_xs_device.cpp` (+65 -0) 📝 `runtime/shims/d3d12_xs_device.h` (+17 -9) 📝 `runtime/test/allocator_proxy_test.cpp` (+24 -7) 📝 `runtime/test/queue_proxy_test.cpp` (+59 -13) 📝 `runtime/test/xs_proxy_mock_test.cpp` (+54 -3) </details> ### 📄 Description 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:17:54 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#447
No description provided.