Skip to content

d3d12_xs: accept Xbox ID3D12GraphicsCommandListX IID in CreateCommandListX - #445

Closed
madhyn wants to merge 1 commit into
ProjectLeonida:mainfrom
madhyn:fix/createcommandlistx-xbox-iid
Closed

madhyn wants to merge 1 commit into
ProjectLeonida:mainfrom
madhyn:fix/createcommandlistx-xbox-iid

Conversation

@madhyn

@madhyn madhyn commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Maps the Xbox ID3D12GraphicsCommandListX IID ({c3827890-4024-474c-98cf-645b51dc4874}) in proxy_create_command_list_x (slot 73) and list_query_interface to the PC ID3D12GraphicsCommandList interface before wrapping in ListProxy.

Testing

  • Added coverage in runtime/test/xs_proxy_mock_test.cpp for creating and querying a command list with {c3827890-4024-474c-98cf-645b51dc4874}.
  • ctest -R xs_proxy_mock: 6/6 passed under Wine 11.22 (Arch Linux, RTX 3060 Ti).
  • Verified with gta6rt.sh --run: CreateCommandListX now succeeds and execution advances past it through CreateCommittedResource3 (slot 127) and CreateShaderResourceView (slot 70).

@fiestorra

Copy link
Copy Markdown
Contributor

Ran your change against the retail title on the current main. Base d42773d07; your commit applies there with no conflicts (git cherry-pick --no-commit 386d6ac5d → the two files, +26/−3). Windows build 26300, MSVC RelWithDebInfo, LEONIDA_D3D12=vulkan on a Radeon 780M integrated GPU (gfx1036), 1.0.2.1 executable and package. Written with an AI assistant.

Without your change, this IID is the wall on today's main. The title now gets past the device slots that landed since main moved — D3D12XboxCreateDevice, CreateCommandQueue, CreateFence, CreateCommandAllocator — and reaches slot 73:

[rt] d3d12_xs: device slot 73 routed to CreateCommandListX (args 0x2060dff9b0 0x1341a576dd0 0x0 0x1461e0668 0x2060dff940)
[rt] d3d12_xs: slot 73 CreateCommandListX desc words 0x00000000 0x00000002 -> node mask 0, type 0
[rt] d3d12: QueryInterface: unknown IID {c3827890-4024-474c-98cf-645b51dc4874}
[d3d12-trace] #13 ID3D12Device::CreateCommandList failed

13 calls recorded in total, and the title then faults with 0x80000003 in its own code (game_scarlett_master.exe+0x2478b7b). The IID it asks for is the one your change maps.

With your change, everything under that call opens up. Same build, same machine, same package: 1639 recorded calls, 1619 ok, no failed call — the command list is created, closed, and the title goes on to XboxIDXGIDevice::GetAdapter, CreatePlacedResourceX (device slot 133), CreateDescriptorHeap, ID3D12Device10::CreateCommittedResource3 (through the merged slot 25 GetResourceAllocationInfo and slot 127 routes), and a batch of CreateShaderResourceView / CreateRenderTargetView / CreateUnorderedAccessView calls. The stop is then a title assert 0x80000003 at game_scarlett_master.exe+0x247af2d — later than any row currently in docs/retail_boot_chain.md. I posted that separately in the coordination issue.

So on this machine your mapping is what carries the boot from 13 calls to ~1640. I did not run xs_proxy_mock_test.cpp (I tested by running the title, not the mock), and I did not check your change against other hardware.

@bobczan

bobczan commented Nov 24, 2026

Copy link
Copy Markdown

Verified on native Windows: this clears the slot-73 IID stop, and the run advances past slot 127

Your testing notes say Wine 11.22 on a 3060 Ti. Nobody had run it on native Windows, so I did, with an A/B on one base.

Base: main 1c93c8697, Windows 11 10.0.26200, MSVC 19.44, Windows SDK 10.0.26100, RTX 5070 driver 32.0.16.2124,
LEONIDA_D3D12=vulkan, 150 s, fresh trace per run.

build runs result
main alone 2/2 identical rc=3, last line d3d12: QueryInterface: unknown IID {c3827890-4024-474c-98cf-645b51dc4874}
main + this PR 2/2 identical rc=3, no occurrence of that IID at all, last line device slot 20 (forwarded) first call

So the mapping does what it claims on a native Windows host, not just under Wine: the IID never reaches the refusal path,
and the run proceeds through the calls you listed.

What it goes through on the way (the log lines, in order, with the PR applied):

device slot 25 (GetResourceAllocationInfo (C or PC form)) first call
device slot 127 (Xbox CreateCommittedResource3) first call
slot 127 resource: dimension=3 xbox layout=0x0 -> PC layout=0x0, xbox flags 0x300005 -> PC flags ...
device slot 20 (forwarded) first call          ← new stop, clean rc=3, no fault

That matches your Wine result through slot 127. The new stop is a plain rc=3 refusal at device slot 20 — not a
crash — so the next blocker is a different, later one.

Reproducibility notes. Same base, same binary path, only the PR's two files differ; the baseline was run twice and
stopped on the identical line both times, and the PR side twice. No flakiness observed.

Register/ID and slot numbers only; no game data.

@QemmHD

QemmHD commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Tested on Windows 11 (VS 2022, main 1c93c86): clean merge, xs_proxy_mock fails without it and the ctests pass with it (8/8), repo-consistency set unchanged. Holding rather than merging because #359 fixes the same slot-73 IID differently (a generic E_NOINTERFACE retry instead of a hardcoded IID); it'd be good for the owner to pick one approach so they don't both land.

AI-assisted (Claude Code, Claude Opus 5.5).

Andretuta added a commit that referenced this pull request Nov 24, 2026
The slot 73 fallback retried every IID the PC device refused, so asking for
a public list revision the backend lacks (ID3D12GraphicsCommandList9 on a
revision-8 device) returned S_OK and a base list instead of E_NOINTERFACE
(review on #359). Only the console ID3D12GraphicsCommandListX IID
{c3827890-4024-474c-98cf-645b51dc4874} (#445) is now created as
ID3D12GraphicsCommandList, in one call, and the list proxy answers
QueryInterface for it. Every other IID reaches the device unchanged.

Tested: xs_proxy_mock (List9 and an unknown IID keep E_NOINTERFACE with a
null output; the console IID is created once and is queryable) and
d3d12_vulkan_device with MSVC 14.44 / SDK 10.0.26100; docs tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@otaviosza

Copy link
Copy Markdown

Tested on Windows 10 22H2 (19045), NVIDIA GeForce RTX 3060, driver 610.88 (32.0.16.1088), LEONIDA_D3D12=vulkan, package 1.0.2.1; this PR merged locally onto main 2d73c24.

  • Without the PR: the run ends right after device slot 73 (CreateCommandListX) with QueryInterface: unknown IID {c3827890-4024-474c-98cf-645b51dc4874}, exit 0x80000003.
  • With the PR: that IID is no longer refused. The boot goes on through list slot 9, device slots 78/79 (SetFrameIntervalX/ScheduleFrameEventX), 133 (CreatePlacedResourceX), 14 (descriptor heaps), 70, 25, 127 and 20, then stops at 0x80000003 again, past this PR.
  • xs_proxy_mock_test: PASS.

Andretuta added a commit that referenced this pull request Nov 24, 2026
#445 makes the same slot 73 change (map the console
ID3D12GraphicsCommandListX IID to ID3D12GraphicsCommandList on creation
and QueryInterface). Use its exact text in d3d12_xs_device.cpp so the two
pull requests merge cleanly in either order; this one keeps the
regression checks (ID3D12GraphicsCommandList9 and an unknown IID keep
E_NOINTERFACE with a null output) and the docs line.

Tested: xs_proxy_mock and d3d12_vulkan_device with MSVC 14.44 / SDK
10.0.26100, on this branch and on this branch merged with #445's head
386d6ac.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@QemmHD

QemmHD commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

FYI: #359 (merged in d0da7da) took this PR's slot-73 mapping verbatim (commit c170702, "take #445's slot 73 mapping verbatim"). I checked: this PR's runtime change is already on main byte for byte. The only thing left unmerged is the 12-line test addition, and main's existing coverage already includes it. I applied it on main and xs_proxy_mock passed, then reverted it. Thanks for the boot evidence that decided it. Unless you want to keep the extra test, this can probably be closed as landed through #359.

AI-assisted (Claude Code, Claude Opus 5.5).

@madhyn

madhyn commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Closing since #359 merged our slot-73 IID mapping verbatim (). Thanks to everyone who tested and reviewed!

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.

5 participants