Repository navigation
Conversation
…forwarding them The device proxy forwards every slot it neither handles nor routes to the PC method of the same index. The console device keeps the PC order through the base ID3D12Device chain (3-43) and diverges past it: 48, 62, 67, 73, 76 and 78-80 are console methods at the indices of unrelated PC methods. Measured with the retail 1.0.2.1 executable on an RTX 4080 SUPER: device slot 70, forwarded to the PC slot 70 (ID3D12Device8::CreatePlacedResource1), took one of the title's words for its output pointer and wrote into the title's code, a silent corruption instead of a stop. set_strict_console_slots(true), which gta6rt calls before the image's code runs (--init, --run), makes the generic thunk refuse such a slot with E_NOTIMPL and one line with its first four words; nothing reaches the PC device. Handled slots, the Xbox routes (also when moved by LEONIDA_XS_*_SLOT), the base chain and the beyond-vtable refusal are unchanged. PC callers and the tests keep the forwarding, and LEONIDA_XS_FORWARD_UNCONFIRMED=1 keeps it in gta6rt for experiments. xs_proxy_mock_test --strict-slots (its own ctest, xs_proxy_mock_strict_slots: the switch is process-wide): 44, 47 and 69 refused without reaching the device; 30 and 43 forwarded; 48 (route) and 75 (handled) unchanged; 77 refused as past the vtable; the override, and a value that is not "1". --env-slots: with the routes moved, the moved route answers and its default slot is refused. docs/d3d12_vulkan.md 4.9 gets a row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Grimkaaah
reviewed
Nov 23, 2026
Grimkaaah
left a comment
Contributor
There was a problem hiding this comment.
Independent Linux CPU review
Checked: strict console slots — unconfirmed device slots past 43 refused with E_NOTIMPL under gta6rt (opt-out LEONIDA_XS_FORWARD_UNCONFIRMED=1); docs + xs_proxy_mock_strict_slots test. Windows/D3D12 harness not run here.
Looks correct from review; no game files.
1 of 2 tasks
Contributor
|
Verified on native Windows 11 (
AI-assisted. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claimed in #9235 (#9235 (comment)) as a new item. Only the strict-mode part of that claim is here: the guarded table and the slot-48 flags are already in #6953/#8252 and #6954/#8258.
Depends on: none. It complements #6973, #7066 and #7240 (see "How it fits with the open PRs").
What and why
The device proxy forwards every slot it neither handles nor routes to the PC method with the same index. The console device keeps the PC order through the base
ID3D12Devicechain (slots 3-43). Past that it diverges: 48, 62, 67, 73, 76 and 78-80 are console methods sitting at the indices of unrelated PC methods.On the retail 1.0.2.1 boot, slot 70 was forwarded to the PC slot 70,
ID3D12Device8::CreatePlacedResource1. That method took one of the title's argument words for its output pointer and wrote into the title's code. The result was silent corruption, not a stop with a name.This PR adds
set_strict_console_slots(bool)(d3d12_xs_device.h):gta6rtturns it on before the image's code runs (--init,--run).E_NOTIMPLand one log line with its first four words, and nothing reaches the PC device.LEONIDA_XS_*_SLOTmoves them), the existing beyond-the-PC-vtable refusal, then the new strict check, and only then the forward. Everything before the strict check is unchanged.LEONIDA_XS_FORWARD_UNCONFIRMED=1keeps the forwarding ingta6rttoo, for experiments.docs/d3d12_vulkan.md§4.9 gets a row for it.How it fits with the open PRs
The strict check runs only on the generic forward path, so it never changes a slot that a PR handles explicitly.
E_NOTIMPL.git merge-treeagainst d3d12_xs: Xbox device slot 70 is handled by the proxy (a null SRV for now, its raw words logged), not the PC CreatePlacedResource1 (retail boot chain stop 14) #7066, d3d12_xs: committed resources lease their size through the title's XMem hooks, so the first render targets pass the budget check (retail boot chain stop 17) #7240, d3d12_xs: Xbox device slot 48 creates a command queue from its 32-byte description #6954, d3d12_xs: mask console-only CreateCommandQueue flag bits before the PC forward #8258, d3d12_xs: add guarded vtables for DeviceProxy and HeapProxy and refused tail for HeapProxy #8252, d3d12_xs: log the guest caller on the first call of a forwarded device slot #7187, d3d12_xs: route device slots 86, 101, and 108 to PC Device2/Device5/Device8 #7201, d3d12_xs: device slot 133 places a resource as a committed DEFAULT one (CreatePlacedResourceX stand-in, depends on #6953) #7075, d3d12_xs: device slot 133 (CreatePlacedResourceX) makes a buffer on the title's own pages (VK_EXT_external_memory_host) #7218, d3d12_xs: device slot 70 finds the buffer slot 133 placed at its address in the proxy (a real view on the PC device and with #7075's stand-in; complements #8225) #8304, d3d12_xs: Xbox device slot 127 creates a committed resource through the PC CreateCommittedResource3 (retail boot chain stop 15) #7052 and d3d12_xs: a device forward refuses a 'this' that is not the proxy #7923 gives no conflicts. d3d12_xs: device slots 25/26 take the retail title's C-ABI struct return (RT-5 stop after device creation) #6973 already conflicts withmainon its own.Measured vs assumed
The executable was only run under
gta6rt, on one PC. Nothing here quotes game bytes or addresses.Measured on the retail 1.0.2.1 boot, with local stand-ins for the earlier stops:
Assumed:
E_NOTIMPL, but the log then names the slot, and the title's memory isn't corrupted.Tested
Windows 11 Pro 26H2 (build 26300), NVIDIA GeForce RTX 4080 SUPER, driver 617.42, MSVC 14.44, CMake + Ninja, RelWithDebInfo, no SDL3:
gta6rt,xs_proxy_mock_test,device_proxy_testandd3d12_vulkan_device_test. There were no warnings in the changed files.ctest -R "^(xs_proxy_mock.*|device_proxy.*|d3d12_vulkan_device)$": 9 of 10 passed.xs_proxy_mock_strict_slots, its own process because the switch is process-wide:LEONIDA_XS_FORWARD_UNCONFIRMED=1forwards, and a value other than1doesn't.xs_proxy_mock_env_slots: with the routes moved, the moved route still answers and its default slot is refused.d3d12_vulkan_devicefails at line 6574 (tiles == 1). It fails the same way onupstream/main867d922f0built and run without this change, so it is unrelated.xs_proxy_mock*tests passed 8 of 8.python -I scripts/check_no_game_data.pyon the changed files: clean.AI-assisted: yes (Claude Code).
Checklist
docs/design.md, with how it was confirmed. (Not applicable: no translator change.)🤖 Generated with Claude Code