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). |
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).