Skip to content

d3d12_xs: serve D3D12ConfigureVirtualMemoryX, the retail title's first boot call - #7193

Closed
bobcatchris wants to merge 1 commit into
ItsNotRexed:mainfrom
bobcatchris:pr/d3d12-configure-virtual-memory
Closed

bobcatchris wants to merge 1 commit into
ItsNotRexed:mainfrom
bobcatchris:pr/d3d12-configure-virtual-memory

Conversation

@bobcatchris

Copy link
Copy Markdown
Contributor

Claim (RT-5): #4816 (comment). Day-one boot outcomes: #4816 (comment) and #4816 (comment)

What and why

The retail 1.0.2.1 executable (game_scarlett_master.exe, 120,181,760 bytes, sha256 e95020b2fa4a721db3df59fdefc7521730ac559d8835252f6c3b658d5a08993, signature-scan clean, no packed sections) is now available to this contributor. gta6rt --run on it showed the title's first boot blocker: it calls d3d12_xs.dll!D3D12ConfigureVirtualMemoryX during D3D12 init (before D3D12XboxCreateDevice), the unimplemented policy returned 0, and the title exited ~2 s after start with no other activity.

The call is the console runtime's ordinal 4 — docs/d3d12_xs_surface.md already marks it 'console | absent | VM policy; PC/Vulkan owns it'. This serves it: recorded once, returns S_OK, so the title proceeds. With it, --run reaches the title's TLS init and its first XMemVirtualAlloc reservations (0x21, 0x3, 0x183 of the five attribute words runtime/shims/xmem.cpp already documents), then stops at the title's own int3 assert — the next RT-5 step. Unimplemented imports for the title: 31 -> 29.

Measured ABI

No parameters, S_OK. Fact checked against SCARAB's components/runtime-bridge/src/d3d12_xs_bridge.cpp (ordinal 4: 'recorded for inspection, return S_OK so callers proceed'), GPL-3.0 prior art per docs/related_projects.md; no code borrowed.

Change

  • runtime/shims/d3d12_xs.cpp: configure_virtual_memory() + the SHIM_TABLE entry, with the measured console/retail context in comments.
  • runtime/test/d3d12_xs_vmem_test.cpp + CTest d3d12_xs_vmem (default WIN32 section): the export resolves through the registry, three calls return S_OK, D3D12XboxCreateDevice/D3D12SerializeRootSignature still resolve. CPU only, no adapter needed.

Tested

  • d3d12_xs_vmem: Pass; the adjacent shim tests (unimplemented_policy, device_proxy, root_sig, command_list) all pass.
  • Full ctest -C RelWithDebInfo on Windows 11 / Ryzen 7 7800X3D: 5 failures (vk_queue_query_sync, d3d12_vulkan_device, d3d12_texture_tiles, d3d12_indirect_dispatch_count, d3d12_pipeline_library_host) — all reproduce on pristine main at 8c22bf40 with this change stashed (some are timing-flaky under the machine's load), so they are pre-existing, not from this PR.
  • End to end on the retail executable through the loader (network isolated): the dry-run binding tables drop from 31 to 29 unimplemented, the new shim logs its call, and the boot path advances past the VM-policy call as measured above.

No game data; the executable itself never leaves this machine. AI-assisted.

…t boot call

The retail 1.0.2.1 executable calls the console runtime's ordinal 4 during
D3D12 init, before D3D12XboxCreateDevice. With no binding the
unimplemented policy returned 0 and the title exited within ~2 s of
start (gta6rt --run, first_look + trace). The call is a VM-policy
statement the PC/Vulkan side owns outright, so it is recorded once and
succeeds; with it the title proceeds through its TLS init and its first
XMemVirtualAlloc reservations.

Measured ABI: no parameters, S_OK. Fact verified against SCARAB's
components/runtime-bridge/src/d3d12_xs_bridge.cpp (ordinal 4), GPL-3.0
prior art per docs/related_projects.md; no code borrowed.

Test: d3d12_xs_vmem_test (resolve through the registry, three calls
return S_OK, the other exports stay reachable). CPU only, no game data.
Verified on the retail executable end to end: unimplemented imports
31 -> 29, the boot path reaches the title's own int3 assert after three
24 GB XMemVirtualAlloc reservations (outcomes in ItsNotRexed#4816).

Claim: RT-5, ItsNotRexed#4816 (comment)
@bobcatchris

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate: #6792 landed the same shim on main first (the rule is first merge wins). Our independently measured retail outcome stands in #4816 (the call is the title's first boot blocker, no-parameter S_OK, 31 -> 29 unimplemented, verified end to end) and matches #6792's implementation. Thanks to the author — same conclusion reached independently from the same executable. AI-assisted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant