mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:00:52 +01:00
[PR #349] [MERGED] d3d12_xs: device slot 26 takes the console's struct-return form, again (RT-SLOT26) #401
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#401
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/349
Author: @Mumogg
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism
Base:
main← Head:slot26-struct-return📝 Commits (1)
c495458d3d12_xs: device slot 26 takes the console's struct-return form📊 Changes
5 files changed (+133 additions, -5 deletions)
View changed files
📝
docs/d3d12_vulkan.md(+6 -0)📝
runtime/shims/d3d12_xs_device.cpp(+27 -3)📝
runtime/shims/d3d12_xs_device.h(+7 -1)📝
runtime/test/device_proxy_test.cpp(+36 -0)📝
runtime/test/xs_proxy_mock_test.cpp(+57 -1)📄 Description
Claimed in #14 as
RT-SLOT26. Clears the stop after #127 and #131.What and why
The retail executable calls
GetCustomHeapProperties(device slot 26) with the buffer for the returned struct in RCX and the device in RDX.main's generic forwarder takes RCX for the proxy, reads a vtable out of the title's stack buffer and faults: the host access violation right afterD3D12XboxCreateDevicethat I measured under Wine and that was confirmed on native Windows in #131.This is commit
86b8e04e4by Senne Cools (-x, authorship kept). It is an ancestor ofmainwhose content is not in the tree. The cherry-pick conflicted with whatmainhas gained around it since; I kept both sides everywhere:d3d12_xs_device.cpp: the slot 26 thunk next to slot 133's, and 26 added todevice_slot_overriddenwith the Xbox route slots.xs_proxy_mock_test.cpp: the slot 26 case next tocheck_xbox_slotsandcheck_console_command_list.docs/d3d12_vulkan.md:main's UMA paragraph, followed by the commit's sentences about the call shape.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
mainece4ba5b3.main--runint3afterCreateCommandQueueis refusedThe next stop is device slot 48: it is routed to
CreateCommandQueueX, and the layer refuses the queue (type, priority, flags or node mask, type 2). That is stop 8 ofdocs/retail_boot_chain.md, and I will look at it next.xs_proxy_mock_testunder Wine: passes, including the new case (buffer in RCX and device in RDX reaches the PC method and writes only the struct; the PC form is forwarded unchanged).device_proxy_testgets a case too, but that test stops atD3D12XboxCreateDevice returns a deviceunder Wine here, onmainas well, so I could not run it.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.