Skip to content

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

Merged
ubiquitarianism merged 7 commits into
ProjectLeonida:mainfrom
Mumogg:slot127-committed-resource3
Nov 24, 2026
Merged

ubiquitarianism merged 7 commits into
ProjectLeonida:mainfrom
Mumogg:slot127-committed-resource3

Conversation

@Mumogg

@Mumogg Mumogg commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

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

sennecools and others added 5 commits November 23, 2026 21:46
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 86b8e04)
…te Xbox description

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 0cde63d)

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.
…ead of reaching PC CreatePlacedResource1 (retail boot chain stop 14)

(cherry picked from commit 3073250)
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 <noreply@anthropic.com>
(cherry picked from commit 5dbc30b)

Adapted to main by Mumogg: slot 26 keeps the thunk it already has (86b8e04), 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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt
Mumogg and others added 2 commits November 23, 2026 22:14
…t of their block

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 ProjectLeonida#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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt
…ttedResource3 with Xbox descriptors, RT-5 stop 15)

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 8d62204)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants