Repository navigation
d3d12_xs: route device slots 86, 101 and 108 to PC Device2/Device5/Device8, rebased on main (RT-SLOT108-REBASE) - #727
Conversation
abnalstlll-byte
left a comment
There was a problem hiding this comment.
LGTM. Critical D3D12 XS slot routing for Xbox slots 86 (CreatePipelineState -> PC 47), 101 (CreateStateObject -> PC 62), and 108 (GetResourceAllocationInfo2 -> PC 68 with C-ABI struct return support and Xbox resource desc normalization). Unit tests in d3d12_xs_test.cpp verify all calling conventions.
|
Independently tested The slot 86/101/108 changes pass all six However, the trial merge onto main introduces a regression in The fixed slot 86/101/108 handlers in Could you rebase onto current main and preserve the configurable routing behavior? The new fixed-slot handlers otherwise look good. |
…evice8 Reopened from #7201 (closed in the PR reset), rebased on current main. Slot 86 (CreatePipelineState stream) -> PC slot 47, slot 101 (CreateStateObject) -> PC slot 62, slot 108 (GetResourceAllocationInfo2) -> PC slot 68. Slot 108 accepts the console C-ABI order (return buffer first) and the PC order, reads the title's 56-byte D3D12_RESOURCE_DESC entries, expands each into a zeroed D3D12_RESOURCE_DESC1, normalizes Xbox layout words and flag bits, and refuses a count with a null array. Rebase: kept main's slot 133 (CreatePlacedResourceX) next to the new slots, and slot 108 now masks flags with slot 133's PC set (0x5FF, which keeps USE_TIGHT_ALIGNMENT and drops 0x200) instead of 0x1FF. (cherry picked from commit 1b07215)
…d slot 86, 101 and 108 handlers The fixed handlers for slots 86, 101 and 108 were matched before the generic branch, which is where xbox_device_slot_routes() is read, so a route that LEONIDA_XS_FRAME_STATISTICS_SLOT or another LEONIDA_XS_*_SLOT variable put on one of those slots never ran. After the rebase onto main, xs_proxy_mock_env_slots failed for that reason: slot 101 reached CreateStateObject instead of GetFrameStatisticsX. The three handlers now sit after the route checks and before the refusal for slots beyond the PC device table, and their own note_slot calls are gone because the generic branch already counts the slot once, so the hit counters stay at 1.
3c8b583 to
ac73a84
Compare
|
@moffington thanks, rebased and fixed; the head is now Reproduced first. After the rebase, Fix. The three handlers now sit after the route checks and before the refusal for slots past the PC device table (the remainder of that branch is an Result. AI-assisted: yes (Claude Code, Sonnet 5.5) |
…ts 86, 101 and 108 to PC Device2/Device5/Device8, rebased on main Conflicts with integration's ProjectLeonida#385 helper and the fold, resolved by hand: the dispatcher calls route_xbox_device_slot first and then ProjectLeonida#727's if-constexpr branches for 86/101/108; device_slot_overridden and its comment list both sides' slots; xs_proxy_mock_test keeps integration's slot 41/61 checks and adds ProjectLeonida#727's 86/101/108 cases. Supersedes the local boot-standins slot-108 stand-in (a821895ad). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This conflicts with The one conflict: in Not compiled or run here: I have no Windows SDK on this machine, so CI is the first build. To take it (maintainer edits are on): git fetch https://github.com/Mouad-Scriptz-0/leonida rebased/pr727
git push --force-with-lease=fix/slot108-rebase:ac73a8412 https://github.com/DesertGamer/leonida FETCH_HEAD:fix/slot108-rebaseAI-assisted. |
Three files conflicted; in each, both sides had added something and both are kept. runtime/shims/d3d12_xs_device.cpp: this branch still had the Xbox device slot routes inline, followed by its fixed handlers for slots 86, 101 and 108; main has since moved the same six routes into route_xbox_device_slot() (ProjectLeonida#385). The generic path now calls the helper and then the three fixed handlers, so a configured route still wins over them, as this branch's second commit intends. device_slot_overridden() has main's list plus 86, 101 and 108. runtime/shims/d3d12_xs_device.h: the comment lists both sides' slots. runtime/test/xs_proxy_mock_test.cpp: the mock device keeps main's case 13 (CheckFeatureSupport) and this branch's case 68 (GetResourceAllocationInfo2); check_xbox_slots keeps main's slot 41 and 61 cases, one combined list of handled slots, and this branch's slot 86, 101 and 108 cases. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Merged. This is the next rung on What it does:
Conflicts: three files; in each, both sides had added something and both are kept.
Holds and requests: none from a maintainer. moffington's request (rebase and keep the configurable routing) is answered by Tests (clang-cl with the xwin SDK; Wine, headless; llvmpipe and an RDNA2 iGPU):
Follow-ups, none blocking the boot path:
#391 is the next rung. AI-assisted (Claude Code, Claude Fable 5.2 and Claude Opus 5.5). |
Claimed in the coordination issue as: RT-SLOT108-REBASE (#14 (comment))
Depends on: none to merge. The retail boot reaches slot 108 only past the command-list IID stop at device slot 73, which #641, #359 and #142 each cover; I measured the slot-108 fault on a stack with #142, and #641 alone gave the same 1,639-call stop point on
mainbefore it. Supersedes #219, which conflicts withmain.What and why
#219 (old PR 9954 by
justr4mzi, carried over as a draft) rebased ontomain21625bc. The commit is the original one, cherry-picked with-x, so the author credit is kept; the only changes are the resolution of its conflicts withmain: three hunks inruntime/shims/d3d12_xs_device.cpp(the new proxy functions go afterproxy_slot74, theSlot == 86 / 101 / 108branches after thekCreateCommittedResource3Xone, and86 || 101 || 108is added todevice_slot_overridden) and the comment ind3d12_xs_device.h. The tests anddocs/d3d12_vulkan.mdapply as they are.What it fixes, measured on a retail run: on the stack
main+ #142 + #427 (the slot-73 fix is #142 there; #641 is the equivalent open one) the title calls console device slot 108 with the device in RDX and RCX not an object (the slot-26 shape);proxy_slottakesselffrom RCX and faults in the host after 11,916 D3D12 calls. With slot 108 routed toGetResourceAllocationInfo2the run goes on, and with #602 (A8_UNORM) it reached the frame loop (888,983PresentX okin 420 s with #357 #387 #432 too; details in #14 (comment)).Tested
ctest -R "xs_proxy_mock|device_proxy": 8 of 8 pass (MSVC, Windows 11, Vulkan SDK 1.4.363).scripts/check_no_game_data.pyon the five changed files, and alltests/test_docs_*.py: pass.GPUs tested: NVIDIA GeForce RTX 5070, driver 617.14, Windows 11
AI-assisted: yes (Claude Code, Sonnet 5.5)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (Not a translator change.)