d3d12_xs: device slot 127 creates the committed resource, again (RT-SLOT127) #369

Manually merged
github merged 7 commits from gh-pr/369/head into gh-pr/369/base 2026-11-26 08:56:06 +00:00
Owner

@⁠Mumogg on GitHub · 2026-11-24 03:59 UTC · original
Mumogg:slot127-committed-resource3 → main · +602 −19 · 6 files · 7 commits · merged 2026-11-24 05:04 UTC

Claimed in #14 as RT-SLOT127. Depends on: #349, #350, #356, #362 (their commits come first here; this pull request is the last commit).

What and why

After #362 the title calls device slot 127. It is past the PC device table, so main refuses it with E_NOTIMPL and the title stops on its own int3.

Commit 8d622049a by tedin7 (-x, authorship kept; an ancestor of main whose content is not in the tree) gives the slot the argument list of ID3D12Device10::CreateCommittedResource3 and calls the PC device's (PC slot 76) with the Xbox layout word replaced as slot 76 does and the flags limited to the PC bits. The cherry-pick conflicted only where neighbours have been added since (the slot 26 thunk, the slot list, the test's call list); 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 and #328 applied on top for the boot runs (they are not in this branch).

--run D3D12 calls Ends with
up to #362 1,631 the title's int3 after slot 127 is refused
+ this 1,639 the title's int3 in a later check

After it the trace has two ID3D12Device10::CreateCommittedResource3 ok and the views made on those resources. The first description logged: a 2D texture, Xbox flags 0x300005 kept as PC flags 0x5.

About the next stop, as far as tools/int3_cause.py shows it: the title stops when a value it computes is above 0x1fffff. That reads like a bound on a descriptor index, which would be the descriptor-heap handle question of the chain document (stop 13); I have not confirmed it yet.

xs_proxy_mock_test under Wine passes, with the commit's slot 127 case (the committed resource is created with the PC flags and layout; a device without ID3D12Device10 gets E_NOTIMPL).

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 03:59 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/369) `Mumogg:slot127-committed-resource3` → `main` · +602 −19 · 6 files · 7 commits · merged 2026-11-24 05:04 UTC Claimed in #14 as `RT-SLOT127`. Depends on: #349, #350, #356, #362 (their commits come first here; this pull request is the last commit). ### What and why After #362 the title calls device slot 127. It is past the PC device table, so `main` refuses it with `E_NOTIMPL` and the title stops on its own `int3`. Commit `8d622049a` by tedin7 (`-x`, authorship kept; an ancestor of `main` whose content is not in the tree) gives the slot the argument list of `ID3D12Device10::CreateCommittedResource3` and calls the PC device's (PC slot 76) with the Xbox layout word replaced as slot 76 does and the flags limited to the PC bits. The cherry-pick conflicted only where neighbours have been added since (the slot 26 thunk, the slot list, the test's call list); 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 and #328 applied on top for the boot runs (they are not in this branch). | `--run` | D3D12 calls | Ends with | |---|---|---| | up to #362 | 1,631 | the title's `int3` after slot 127 is refused | | + this | 1,639 | the title's `int3` in a later check | After it the trace has two `ID3D12Device10::CreateCommittedResource3 ok` and the views made on those resources. The first description logged: a 2D texture, Xbox flags `0x300005` kept as PC flags `0x5`. About the next stop, as far as `tools/int3_cause.py` shows it: the title stops when a value it computes is above `0x1fffff`. That reads like a bound on a descriptor index, which would be the descriptor-heap handle question of the chain document (stop 13); I have not confirmed it yet. `xs_proxy_mock_test` under Wine passes, with the commit's slot 127 case (the committed resource is created with the PC flags and layout; a device without `ID3D12Device10` gets `E_NOTIMPL`). 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
The retail executable calls GetCustomHeapProperties with the return buffer in RCX and the device in RDX. The forwarder took RCX for the proxy and faulted.

AI-assisted.

(cherry picked from commit 86b8e04e4c)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 0cde63d618)

Adapted to main by Mumogg: main already routes slot 48 through its Xbox slot table (LEONIDA_XS_QUEUE_X_SLOT),
so the route now calls proxy_create_command_queue_xbox instead of a fixed slot 48 branch, and xs_proxy_mock's
check_xbox_slots and the environment case pass the console's 32-byte description.
(cherry picked from commit 3073250df5)
The retail executable calls GetCustomHeapProperties (device slot 26) with the
C convention: the hidden return buffer in RCX and the device in RDX. The
proxy's generic forwarder assumed the PC C++ form (this in RCX, buffer in
RDX), took the buffer for the device and crashed on its vtable right after
D3D12XboxCreateDevice.

Slots 25 (GetResourceAllocationInfo, same rule, inferred) and 26 (measured)
now get thunks that accept either form: whichever of the first two arguments
is the device proxy is `this`. The runtime's own code still calls the proxy
through d3d12.h in the PC form. device_proxy_test calls both slots in both
forms against WARP.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 5dbc30bed7)

Adapted to main by Mumogg: slot 26 keeps the thunk it already has (86b8e04e4), so of this commit's two thunks
only slot 25's is installed.
The mock device answers GetResourceAllocationInfo, and the new case calls slot 25 with the return buffer in RCX
and the device in RDX, then in the PC form: both reach the PC method with the mask, count and descriptions, and
only the struct is written.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt
The slot 25/26 cases added before this block call slot 26 four times, so its absolute counts (3, then 4) failed
on Windows. The counts are now increases from the block's start, and the forwarding check no longer shares a
line with a counter, so a counter failure is not reported as a forwarding failure.

Patch by BadgersMC, from the review of #362 (found and tested on native Windows with WARP; device_proxy_test
does not run under Wine here).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt
Slot 127 is past the PC device vtable and was refused with E_NOTIMPL. It has the argument list of ID3D12Device10::CreateCommittedResource3; the proxy now calls the PC device's with the Xbox layout word and flag bits cleaned as slot 76 does. Measured in #6982.

(cherry picked from commit 8d622049ae)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:56:04 +00:00
github manually merged commit 81e8a6f2a4 into gh-pr/369/base 2026-11-26 08:56:06 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.