Repository navigation
d3d12_xs: device slot 26 takes the return buffer in RCX and the device in RDX, as the retail executable calls it (RT-5) - #6964
Conversation
The retail executable calls GetCustomHeapProperties with the return buffer in RCX and the device in RDX. The forwarder took RCX for the proxy and faulted. AI-assisted.
|
Tested on the retail executable: pass. Own 1.0.2.1 copy (exe sha256
#6973 gives the same result on the same base. Slot 25 isn't called before slot 48 in this run, so only the slot 26 half can be compared on the retail boot so far. AI-assisted (Claude Code). |
…two comments AI-assisted.
AI-assisted.
devnull34
left a comment
There was a problem hiding this comment.
Hardware & Environment
- Host: Windows 11 Build 26300 x64
- GPU: AMD Radeon RX 7900 GRE (16 GB VRAM)
- Toolchain: MSVC 19.44 (Visual Studio 2022), CMake 4.4
Verification Summary
Targets compiled with MSVC 19.44 and executed natively:
-
xs_proxy_mock_test.exe:- Passed with 0 failures (
xs_proxy_mock_test: PASS (9 allocations refused on purpose)). - Validated that
check_custom_heap_propertiesexercises slot 26 (GetCustomHeapProperties) with console C-ABI struct-return calling convention (padded.valuebuffer in RCX, device in RDX), writing exactD3D12_HEAP_PROPERTIESoutput without buffer overrun or corruption of surrounding guard bytes, while also verifying PC C++ ABI caller forwarding.
- Passed with 0 failures (
-
device_proxy_test.exe:- Passed with 0 failures across live WARP adapter testing.
-
CTest Suite:
device_proxy: Passed (0.03s)device_proxy_trace: Passed (0.03s)xs_proxy_mock: Passed (0.01s)xs_proxy_mock_no_reserve: Passed (0.01s)xs_proxy_mock_no_protect: Passed (0.01s)xs_proxy_mock_no_handler: Passed (0.01s)- Total: 6/6 passed (100%).
-
Overlap Note:
- Note for maintainers: PR #6973 covers both slot 25 and slot 26. Whichever PR merges first, the other can be rebased or consolidated accordingly.
-
Hygiene & Compliance:
- Clean-room compliant: pure synthetic unit tests; zero game assets or proprietary code.
git diff origin/main..HEAD --check: Clean (0 whitespace/formatting defects).
LGTM!
|
Note for the rebase: the #6935 conflict you listed is now on |
|
Independent before/after test of Local stack: #4313 + #6792 + #6919 + #6582 + #4348 + #3410 with static SDL 3.4.20. The GameInput ordinal is bound to the shim, and the game opens its first DirectStorage file, calls the physical-page allocator and creates a Vulkan device on the 5070 Ti. Without this slot 26 patch the first forwarded call produced a read access violation. With this patch it reaches the device's Xbox queue creation at slot 48, where this build still forwards the call. The synthetic Only call outcomes are reported. AI-assisted (Codex). |
|
Tested Retail Xbox Series 1.0.2.1 package + executable (sizes match
Outcomes only; no game data. |
|
Closing my #6973 as a duplicate of this one: same measurement, same fix for slot 26, and yours came first. One point from #6973 for a possible follow-up, not a blocker here: slot 25 ( AI-assisted (Claude Code). |
|
Tested
|
|
Independent native Windows check of
The run has not produced a frame/menu. Socket creation, DNS and transmission remain debugger-guarded; local Winsock initialization is permitted. Outcomes only: no game files, raw trace, title offsets or register contents attached. AI-assisted (Codex). |
…t 26 from ItsNotRexed#6964, slot 25 return-buffer form kept from ItsNotRexed#6973
|
Tested
AI-assisted (Claude Code); outcomes only, no game data. |
|
Tested on the retail executable: pass. slot 26 is called right after device creation; no fault, and the title moves on to its queues. Setup: own Xbox 1.0.2.1 copy (exe 120,181,760 bytes), Windows 11 26200, RX 9070 XT (AMD Windows driver), MSVC 14.44 RelWithDebInfo, Result (one run): the device is created; 5 queues (4 through slot 48), 5 fences and 7 allocators; 581 command lists created and closed through slot 73 (list slots 132 and 131 reached on the console-IID lists); slots 78/79 answered; then the xmem placeholder window, its 2 MiB commits and the physical-page maps all succeed ( AI-assisted (Claude Code). |
Claimed in the coordination issue as: D3D-669 (claim)
Depends on: none. Text conflicts with #6954 and #6935; the second to land rebases. #6973, opened later, makes the same slot 26 change.
What and why
gta6rt --runon the retail executable crashes in the loader right after device creation:0xC0000005inproxy_slot<26>.The title calls device slot 26 (
GetCustomHeapProperties) with the return buffer in RCX and the device in RDX. The proxy assumed the PC C++ order and took the buffer for the device.Fix: slot 26 takes that form when RDX holds the device proxy. A PC-style call is forwarded as before. Slots 25 and 43 are not changed.
Tested
Windows 11, MSVC 14.44, RX 9070 XT (driver 32.0.32029.2010).
xs_proxy_mock_testanddevice_proxy_testpass. Againstmain's proxy,device_proxy_testends with the same0xC0000005.ctest: 235 pass, 11 skip, 4 fail. The 4 also fail onmainhere:vk_queue_query_sync,d3d12_texture_tiles,d3d12_indirect_dispatch_count,d3d12_pipeline_library_host.AI-assisted: yes
Checklist
docs/design.md, with how it was confirmed. (not a translator change)