Repository navigation
Conversation
|
Request changes. The three explicit routes and their interface-version guards are consistent with the existing proxy design, but slot 108 has two descriptor-handling problems that should be resolved before merging.
The remaining routing changes are well structured:
The new retail slot identities, return-buffer ordering, and descriptor interpretation still need traceable reverse-engineering evidence: executable/module identity plus call-site RVA or offset, especially for the array stride. Synthetic tests establish behavior under the proposed ABI; they do not independently establish the retail ABI. Document unsupported measurements as hypotheses. Verification supplied by the harness on Windows 11 / CPython 3.13, without game files:
I did not rerun those checks. The additional focused Python reproduction checked descriptor sizes, offsets, and the conversion boundary; it did not execute the C++ proxy. The PR adds cases to The reviewed changes contain no game payloads, keys, decryption or protection workarounds, or Xbox Live/Rockstar service access. They implement explicit routes rather than adding shader skip lists. No translator rule changes, so the shader contract-table and handwritten AI-assisted. |
|
Tested
AI-assisted (Claude Code). |
|
Both points from the review are addressed in
Re-verified on Windows 11 / MSVC 19.44.35230.0 / AMD Radeon RX 6700 XT: AI-assisted (Gemini, Antigravity). |
|
Static support for the slot 86 mapping, from the retail 1.0.2.1 executable (my own copy; Ghidra/capstone on targeted functions): the title's call at The 0x2b0-byte stream uses PC subobject types: ROOT_SIGNATURE (0) at |
|
Tested |
|
Tested Integration note: the 86 → 47, 101 → 62 and 108 → 68 mappings match #7490's console order (Device1..5 forwarded 39 lower, Device6..8 40 lower), so the two agree on these three slots. |
|
Tested 8e76568 on NVIDIA GeForce RTX 5070 Ti, driver 617.42, Windows 11 build 26300, VS 2022 Build Tools (MSVC 19.44), Windows SDK 10.0.26100, RelWithDebInfo: pass. Built AI-assisted (Claude Code). |
|
Tested
|
|
Tested 8e76568 on Windows 11, AMD Radeon RX 9070 XT (RDNA4), driver 32.0.32029.2010: pass
AI-assisted (Claude Code). |
|
Tested
One point for when this and #7679 both land: slot 108 cleans each descriptor with its own rule, which differs from #7679's shared
So the console's 2D R32G8X24_TYPELESS depth-stencil texture with AI-assisted (Claude Code). No game files. checked: #72011d080f4 | with: ctest -R "^(device_proxy|device_proxy_trace|xs_proxy_mock.*)$", PR merged onto main@867d922f next to main | on: Windows 11 Pro 26200, NVIDIA GeForce RTX 5080 (driver 621.24), clang-cl 23.1.6 + xwin (Windows runtime ON) | result: pass, 8/8 on both sides |
|
checked: #72011d080f4 | with: the same merge into For A38. No game data. AI-assisted (Claude Code). agent: yes |
… unrelated PC methods Slot 57 is the console's graphics pipeline from the pipeline library in shaders.rpf, the graphics sibling of slot 67: (desc, riid, out). Every call went to the PC CreateLifetimeTracker and was refused (25,450 times in a 120 s boot of retail 1.0.2.1; the library has 25,471 graphics records). The description, dumped from the title's first calls: root signature, state blob, pipeline (input-layout) blob, then stage slots of (program, size, stage blob, size) in the library record's order, PS at +0x28 and VS at +0x48; slot 2 at +0x68 is taken as the MS by the record's order (not yet seen). The stand-in hands the programs and root signature to the PC device with D3D12's default fixed-function state, since the state blob is undecoded; a mesh pipeline goes through ID3D12Device2::CreatePipelineState. The Vulkan device has no lookup for bare library graphics programs yet: it refuses them as a missing translation, so LEONIDA_STUB_PIPELINES=1 turns them into no-op pipelines instead of E_INVALIDARG for a non-FSSM stage. Slot 86 is the public ID3D12Device2::CreatePipelineState (the console places Device1-5 39 slots past their PC places, as ItsNotRexed#7490/ItsNotRexed#7201 map it): the stream goes to PC slot 47 unchanged instead of being refused past the 80-slot table. xs_proxy_mock: check_pipeline_slots (VS+PS, VS only, MS+PS stream, refused shapes, a PC refusal, slot 86 forwarding and a device without Device2). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
checked: #7201 | with: applied the diff on main 6312c05, built xs_proxy_mock_test and device_proxy_test (MSVC 14.44, Ninja RelWithDebInfo) | on: Windows 11, RX 9060 XT | result: PASS — xs_proxy_mock_test PASS (9 allocations refused on purpose), device_proxy_test OK (0 failures) Code read: slot 86 forwards to PC slot 47 with E_NOINTERFACE past slot_count and E_POINTER on null riid; slot 101 to PC slot 62 with the same refusals; slot 108 to PC slot 68 accepts both the Xbox C-ABI (ret buf in RCX) and PC member order, copies the 56-byte DESC prefix into a zeroed DESC1, normalizes console TEXTURE_LAYOUT values (ROW_MAJOR for buffers, UNKNOWN for textures) and masks Flags to PC bits. slot_name and device_slot_overridden cover all three, docs updated. AI-assisted check. |
…nd 108 to PC Device2/Device5/Device8 Squashed from ItsNotRexed#7201 by justr4mzi, head 8e76568 (security scan PASS). Conflicts: slot names, routing branches, device_slot_overridden, the header and check_levels/check_xbox_slots keep slots 86/101/108 next to the slot 133, 61, 41 and committed-resource entries; the two device_slot_overridden expectations in check_xbox_slots are merged into one. Also rewraps the route_xbox_device_slot comment (ItsNotRexed#7323 left it past 120 columns).
…vice slot 55 Squashed from ItsNotRexed#7759 by LooperSalty, head d80c408 (security scan PASS). Contains ItsNotRexed#7201 and ItsNotRexed#7125 (both already here). Conflicts: slot names, routing, device_slot_overridden and the header add slot 55 to the union; docs, the CreateReservedResource checks in d3d12_vulkan_device_test and device_proxy_test take this PR's version; the mock test keeps the slot 133/41/61 checks.
…t expectations) ItsNotRexed#7759 carries ItsNotRexed#7201's slot 86/101/108 handlers; its squash added them a second time next to ItsNotRexed#7201's copy (the 101/108 bodies are identical, and ItsNotRexed#7759's slot 86 keeps the PSO stream for slot 55), so ItsNotRexed#7201's copy is removed. xs_proxy_mock_test: the check_xbox_slots summary line merged for ItsNotRexed#7163 had its \n written as a line break; ItsNotRexed#7235's slot-127 hook check now expects no PC slot 25 call for a listed render target (the console-size port from ItsNotRexed#7240 sizes it, same 33,423,360 B); ItsNotRexed#7821's check_view_heap_cap releases the heaps it makes, since its CreateDescriptorHeap mock case is now ItsNotRexed#7021's, which makes a heap proxy holding the device. d3d12_vulkan_device_test: the meta-command checks run on the device behind the Xbox proxy, as ItsNotRexed#7125 does for CreateReservedResource2: proxy slot 61 is the title's CreateSamplerX (ItsNotRexed#7115).
…ots 86, 101 and 108 Squashed from ItsNotRexed#8517 by Hiiva, head 07b32da (security scan PASS). Applied as the PR's own diff (gh pr diff): its branch sits on a newer upstream main. The tree already has one handler per slot (ItsNotRexed#7201, with ItsNotRexed#7759's stream-keeping slot 86), and the apply added this PR's copies beside them; the copies are dropped and the single handlers go through the queried interfaces instead: create_pso_from_stream (slots 86 and 55) through ID3D12Device2, slot 101 through ID3D12Device5, slot 108 through ID3D12Device8. Its check_distinct_device_interfaces test is added to the mock test's list.
Summary
d3d12_xsID3D12Devicevtable slots displaced by Xbox-specificID3D12Device1..ID3D12Device4methods to their PCID3D12Device2/ID3D12Device5/ID3D12Device8counterparts onDeviceProxy:86(CreatePipelineState(const D3D12_PIPELINE_STATE_STREAM_DESC*, REFIID, void**)) -> PC slot47(ID3D12Device2::CreatePipelineState), refusing withE_NOINTERFACEviarefuse_beyond_device(86, self->slot_count)whenself->slot_count <= 47, zeroing*out, and returningE_POINTERon nullriid.101(CreateStateObject(const D3D12_STATE_OBJECT_DESC*, REFIID, void**)) -> PC slot62(ID3D12Device5::CreateStateObject, displaced on Xbox where slot62is the Xbox compute-PSO helper), refusing withE_NOINTERFACEwhenself->slot_count <= 62, zeroing*out, and returningE_POINTERon nullriid.108(GetResourceAllocationInfo2(UINT visibleMask, UINT numResourceDescs, const D3D12_RESOURCE_DESC1* pResourceDescs, D3D12_RESOURCE_ALLOCATION_INFO1* pResourceAllocationInfo1)) -> PC slot68(ID3D12Device8::GetResourceAllocationInfo2). Accepts both the Xbox C-ABI struct return order (ret_bufinRCX,DeviceProxy*inRDX) and PC C++ member-function order (DeviceProxy*inRCX,ret_bufinRDX), copies each input descriptor's 56-byteD3D12_RESOURCE_DESCprefix into a zeroedD3D12_RESOURCE_DESC1withSamplerFeedbackMipRegion = {}, normalizes Xbox-specificD3D12_TEXTURE_LAYOUTvalues aboveD3D12_TEXTURE_LAYOUT_64KB_STANDARD_SWIZZLE(0x101,0x105, etc.) toROW_MAJORfor buffers andUNKNOWNfor textures, masksFlagsto PC-valid bits (& 0x1FFu), forwards toreal_vtable[68], and returnsretinRAX.slot_name()anddevice_slot_overridden()for slots86,101, and108, and documents the three slot mappings indocs/d3d12_vulkan.md§3.1.runtime/test/xs_proxy_mock_test.cppandruntime/test/device_proxy_test.cpp(interface-level refusal onDevice..Device7, forwarding onDevice2/Device5/Device8, C-ABI and PC-order return buffer handling, and Xbox layout/flag normalization compared against directID3D12Device8::GetResourceAllocationInfo2on WARP).Claim: #7049 (comment)
Verification
upstream/main(d239fd855):xs_proxy_mock_test.exefails (exit 1) atdevice_slot_overridden(86)/check_levels().device_proxy_test.exefails (6 failures,exit 1); calling slot108with C-ABI return order hitspassthrough_83and misreadsself->slot_countfrom the caller's stack return buffer (slot 108 (<unknown>) beyond wrapped interface (3 slots) — refusing).dc29ee347) on Windows 11, MSVC 19.44.35230.0, AMD Radeon RX 6700 XT:ctest --output-on-failure -R "^(xs_proxy_mock|device_proxy|d3d12_present|d3d12_draw|d3d12_translated_draw|d3d12_m2_textured)": 12/12 passed (2.37 s).LEONIDA_VK_VALIDATION=1 ctest --output-on-failure -R "^(xs_proxy_mock|device_proxy|d3d12_present|d3d12_draw|d3d12_translated_draw|d3d12_m2_textured)": 12/12 passed (2.21 s, 0 validation errors).python -I scripts/check_no_game_data.py:exit 0.python -m unittest discover -s tests -p "test_docs*.py" -v: 36/36 OK.AI-assisted (Gemini, Antigravity).