d3d12_xs: device slot 25 takes the console's struct-return form too (RT-SLOT25) #362
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!362
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/362/head"
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?
@Mumogg on GitHub · 2026-11-24 03:55 UTC · original
Mumogg:slot25-struct-return→main· +394 −19 · 6 files · 6 commits · merged 2026-11-24 05:00 UTCClaimed in #14 as
RT-SLOT25. Depends on: #349, #350, #356 (their commits are the first three here; this pull request is the last two).What and why
After #356 the retail boot stops with a host access violation at device slot 25,
GetResourceAllocationInfo. It is slot 26's twin (#349): a method that returns a struct, called by the title with the buffer for the struct in RCX and the device in RDX, whilemain's forwarder takes RCX for the proxy.5dbc30bedby sneylol (-x, authorship kept; an ancestor ofmainwhose content is not in the tree) adds thunks for slots 25 and 26 that accept either form: whichever of the first two arguments is the device proxy isthis. Slot 26 already has its thunk from #349, so only slot 25's is installed here; the commit message says so.xs_proxy_mock_testgets a case for slot 25 in both forms. The original commit tested it indevice_proxy_test, which I cannot run (it stops atD3D12XboxCreateDevice returns a deviceunder Wine, onmaintoo).Not included: the later guard for a stale vtable pointer in the title's return buffer (
4154ab0a6, TreXito). It builds on this and can follow.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, with #142 and #328 applied on top for the boot runs (they are not in this branch).--runint3, after device slot 127 is refused as beyond the PC device table (E_NOTIMPL)The D3D12 call count is 1,631 in both:
GetResourceAllocationInfois not one of the traced calls. The next stop is slot 127, the console's committed-resource creation.xs_proxy_mock_testunder Wine passes, with the new case: the buffer in RCX and the device in RDX reaches the PC method with the mask, count and descriptions, only the struct is written and the bytes around it stay; the PC form reaches it too.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
@BadgersMC on GitHub · 2026-11-24 04:10 UTC · original
I reproduced a slot 26 test regression on native Windows and tested the small patch below on this PR's head
9bc1f8f1.device_proxypasses atf9d20bf9and first fails at91575fda, withslot 26 hit counter is 3andslot 26 PC form still forwards GetCustomHeapProperties.The new WARP coverage calls slot 26 four times before the existing block reaches its absolute hit-count checks. Measuring the increase from the start of that block preserves the routing checks. Checking the returned heap properties separately also keeps a counter failure from being reported as a forwarding failure.
After applying the patch, all 8
device_proxyandxs_proxy_mocktests passed, including trace mode. Windows 11 build 26100, MSVC 19.44.35228, Windows SDK 10.0.26100,RelWithDebInfo, WARP and synthetic fixtures. No game files were used. AI-assisted with Codex.Test-only patch for
9bc1f8f1@Mumogg on GitHub · 2026-11-24 04:15 UTC · original
Thank you, that is exactly the kind of failure I cannot see from here:
device_proxy_testdoes not get past device creation under Wine.Your patch is applied as its own commit on this branch (
992b19bd4, credited to you in the message), and the pull requests stacked above this one (#369, #375, #377, #383) are rebased onto it, so they carry the fix too. I rebuiltdevice_proxy_test,xs_proxy_mock_testandgta6rtwith clang-cl after the rebase andxs_proxy_mock_testpasses under Wine; thedevice_proxyresult is yours.AI-assisted.