d3d12_xs: accept Xbox ID3D12GraphicsCommandListX IID in CreateCommandListX #445

Closed
github-bot wants to merge 1 commit from gh-pr/445/head into gh-pr/445/base
Owner

@⁠madhyn on GitHub · 2026-11-24 05:31 UTC · original
madhyn:fix/createcommandlistx-xbox-iid → main · +26 −3 · 2 files · 1 commits · closed without merging

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).
**@⁠madhyn** on GitHub · 2026-11-24 05:31 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/445) `madhyn:fix/createcommandlistx-xbox-iid` → `main` · +26 −3 · 2 files · 1 commits · closed without merging 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).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:00:31 +00:00
github-bot closed this pull request 2026-11-26 09:00:31 +00:00
Author
Owner

@⁠fiestorra on GitHub · 2026-11-24 07:09 UTC · original

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.

**@⁠fiestorra** on GitHub · 2026-11-24 07:09 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/445#issuecomment-7124675646) 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.
Author
Owner

@⁠bobczan on GitHub · 2026-11-24 08:01 UTC · original

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.

**@⁠bobczan** on GitHub · 2026-11-24 08:01 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/445#issuecomment-7125627846) ### 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.
Author
Owner

@⁠QemmHD on GitHub · 2026-11-24 08:54 UTC · original

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

**@⁠QemmHD** on GitHub · 2026-11-24 08:54 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/445#issuecomment-7126710414) 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).
Author
Owner

@⁠otaviosza on GitHub · 2026-11-24 13:35 UTC · original

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 2d73c242f.

  • 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.
**@⁠otaviosza** on GitHub · 2026-11-24 13:35 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/445#issuecomment-7133045492) 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` 2d73c242f. - 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.
Author
Owner

@⁠QemmHD on GitHub · 2026-11-24 14:10 UTC · original

FYI: #359 (merged in d0da7dade) took this PR's slot-73 mapping verbatim (commit c1707025a, "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).

**@⁠QemmHD** on GitHub · 2026-11-24 14:10 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/445#issuecomment-7133956633) FYI: #359 (merged in d0da7dade) took this PR's slot-73 mapping verbatim (commit c1707025a, "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).
Author
Owner

@⁠madhyn on GitHub · 2026-11-24 14:21 UTC · original

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

**@⁠madhyn** on GitHub · 2026-11-24 14:21 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/445#issuecomment-7134254763) Closing since #359 merged our slot-73 IID mapping verbatim (). Thanks to everyone who tested and reviewed!

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.