d3d12_xs_device: slot 73 creates the console ID3D12GraphicsCommandListX IID as ID3D12GraphicsCommandList (RT-XS-DEVICE-STOPS-7-9) #359

Manually merged
github merged 5 commits from gh-pr/359/head into gh-pr/359/base 2026-11-26 08:55:25 +00:00
Owner

@⁠Andretuta on GitHub · 2026-11-24 03:53 UTC · original
ubiquitarianism:feat/xs-device-stops-7-9 → main · +52 −4 · 3 files · 5 commits · merged 2026-11-24 13:44 UTC

Claimed in the coordination issue as: RT-XS-DEVICE-STOPS-7-9 (#14)

What and why

Reduced after review to what current main does not already have. Slots 25/26 (the console's struct-return form) and 48 (CreateCommandQueueX descriptor sanitizing) landed on main in the meantime. The slot 58 forwarder is dropped: PC vtable slot 58 is ID3D12Device5::RemoveDevice, not GetResourceAllocationInfo1 (PC slot 56), and no call to Xbox slot 58 is measured.

  • Stop 9, CreateCommandListX (slot 73, docs/retail_boot_chain.md §3.3): the title passes the console ID3D12GraphicsCommandListX IID {c3827890-4024-474c-98cf-645b51dc4874} (measured in #445), which the PC device does not know. That IID is created as ID3D12GraphicsCommandList in one call and handed out as the console list proxy, which also answers QueryInterface for it. Every other IID goes to the device unchanged.
  • Fixed after review (ABI review): the first version retried any IID the 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. It now returns E_NOINTERFACE with a null output again.

The slot 73 change in d3d12_xs_device.cpp is now #445's patch line for line, so the two merge cleanly in either order (checked with git merge-tree and a test build of both merged, where xs_proxy_mock and d3d12_vulkan_device pass). This PR adds the tests and the docs.

Tested

  • MSVC 14.44 / Windows SDK 10.0.26100: xs_proxy_mock and d3d12_vulkan_device pass under CTest. New slot-73 checks: ID3D12GraphicsCommandList9 and an unknown private IID keep E_NOINTERFACE with a null output and one device call; the console IID is created once as ID3D12GraphicsCommandList and is queryable on the proxy; a PC IID the device refuses is not retried. The ID3D12GraphicsCommandList9 check fails on the previous head.
  • Docs tests: 47 passed.
  • Not run against the retail title; reviewers' reports above cover the boot progress past slot 73.

GPUs tested: n/a (mock device)

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a)

🤖 Generated with Claude Code

**@⁠Andretuta** on GitHub · 2026-11-24 03:53 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/359) `ubiquitarianism:feat/xs-device-stops-7-9` → `main` · +52 −4 · 3 files · 5 commits · merged 2026-11-24 13:44 UTC Claimed in the coordination issue as: RT-XS-DEVICE-STOPS-7-9 (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) ### What and why Reduced after review to what current `main` does not already have. Slots 25/26 (the console's struct-return form) and 48 (`CreateCommandQueueX` descriptor sanitizing) landed on `main` in the meantime. The slot 58 forwarder is dropped: PC vtable slot 58 is `ID3D12Device5::RemoveDevice`, not `GetResourceAllocationInfo1` (PC slot 56), and no call to Xbox slot 58 is measured. - **Stop 9, `CreateCommandListX` (slot 73, `docs/retail_boot_chain.md` §3.3):** the title passes the console `ID3D12GraphicsCommandListX` IID `{c3827890-4024-474c-98cf-645b51dc4874}` (measured in #445), which the PC device does not know. That IID is created as `ID3D12GraphicsCommandList` in one call and handed out as the console list proxy, which also answers `QueryInterface` for it. Every other IID goes to the device unchanged. - **Fixed after review** ([ABI review](https://git.gtahub.st/github/ubiquitarianism--leonida/pulls/359)): the first version retried any IID the 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. It now returns `E_NOINTERFACE` with a null output again. The slot 73 change in `d3d12_xs_device.cpp` is now #445's patch line for line, so the two merge cleanly in either order (checked with `git merge-tree` and a test build of both merged, where `xs_proxy_mock` and `d3d12_vulkan_device` pass). This PR adds the tests and the docs. ### Tested - MSVC 14.44 / Windows SDK 10.0.26100: `xs_proxy_mock` and `d3d12_vulkan_device` pass under CTest. New slot-73 checks: `ID3D12GraphicsCommandList9` and an unknown private IID keep `E_NOINTERFACE` with a null output and one device call; the console IID is created once as `ID3D12GraphicsCommandList` and is queryable on the proxy; a PC IID the device refuses is not retried. The `ID3D12GraphicsCommandList9` check fails on the previous head. - Docs tests: 47 passed. - Not run against the retail title; reviewers' reports above cover the boot progress past slot 73. GPUs tested: n/a (mock device) AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
# Conflicts:
#	runtime/shims/d3d12_xs_device.cpp
#	runtime/shims/d3d12_xs_device.h
#	runtime/test/xs_proxy_mock_test.cpp
Reduced to what main does not already have: slots 25/26 (struct return) and
48 (queue desc sanitize) landed on main, and the slot 58 forwarder is dropped
(PC vtable slot 58 is ID3D12Device5::RemoveDevice, not
GetResourceAllocationInfo1, and no call to Xbox slot 58 is measured).

CreateCommandListX passes the title's console command-list IID, which the PC
device does not know (docs/retail_boot_chain.md 3.3). On E_NOINTERFACE for an
IID that is not a PC list IID, create the list once more as
ID3D12GraphicsCommandList and hand out the console list proxy. A PC list IID
the device refuses still fails as before.

AI-assisted. Tested: xs_proxy_mock_test new checks with clang 23 / mingw x64
(a pre-existing kLong allocation-injection check does not fire under mingw, so
the full run needs MSVC/CI).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 <[email protected]>
#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
386d6ac5d.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:55:23 +00:00
github manually merged commit c1707025a1 into gh-pr/359/base 2026-11-26 08:55:25 +00:00
Author
Owner

@⁠Sigtryggur-Mani-Gudmundsson on GitHub · 2026-11-24 05:32 UTC · original · edited 2026-11-24 05:44 UTC

I tested the slot 73 fallback against the Vulkan backend from main@8f481cf1 under Wine on an RTX 4070 Ti. With a synthetic private IID, main returned E_NOINTERFACE. With this PR’s proxy, the list closed, submitted and reached fence value 1. This covers the creation route in the new boot report.

One public capability check regresses. Requesting ID3D12GraphicsCommandList9 on a backend that implements revision 8 returns S_OK and a base list. A guard for public list revisions preserves E_NOINTERFACE and a null output while the private request still reaches the fence. The complete PR mock passed with the guard. Separately, querying the returned proxy for the original synthetic private IID still returns E_NOINTERFACE. I did not run the retail title.

I isolated your fallback on current main and included a small review patch against e7b32cd9, with a source-only GPU fixture and results. Patches and reproduction. AI-assisted with Codex.

The full proxy mock now passes on unchanged main and main with the standalone slot-73 patch. My earlier slot-26 test failure came from my LLVM-MinGW header adaptation. On the RTX 4070 Ti, both builds returned the same heap properties and allocation info as the underlying D3D12 device through both calling conventions, with vkd3d-proton 2.11.0 and 3.0.0. The updated reproduction link includes the build script and hardware fixture.

**@⁠Sigtryggur-Mani-Gudmundsson** on GitHub · 2026-11-24 05:32 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/359#issuecomment-7123045445) · edited 2026-11-24 05:44 UTC I tested the slot 73 fallback against the Vulkan backend from `main@8f481cf1` under Wine on an RTX 4070 Ti. With a synthetic private IID, main returned `E_NOINTERFACE`. With this PR’s proxy, the list closed, submitted and reached fence value 1. This covers the creation route in the [new boot report](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14). One public capability check regresses. Requesting `ID3D12GraphicsCommandList9` on a backend that implements revision 8 returns `S_OK` and a base list. A guard for public list revisions preserves `E_NOINTERFACE` and a null output while the private request still reaches the fence. The complete PR mock passed with the guard. Separately, querying the returned proxy for the original synthetic private IID still returns `E_NOINTERFACE`. I did not run the retail title. I isolated your fallback on current main and included a small review patch against `e7b32cd9`, with a source-only GPU fixture and results. [Patches and reproduction](https://github.com/Sigtryggur-Mani-Gudmundsson/graphics-runtime-patches/tree/d9a0bc1b070d8a36c81b182bc67edd7d24b41bf2/tests/command-list-interface). AI-assisted with Codex. The full proxy mock now passes on unchanged main and main with the standalone slot-73 patch. My earlier slot-26 test failure came from my LLVM-MinGW header adaptation. On the RTX 4070 Ti, both builds returned the same heap properties and allocation info as the underlying D3D12 device through both calling conventions, with vkd3d-proton 2.11.0 and 3.0.0. The updated reproduction link includes the build script and hardware fixture.
Author
Owner

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

Ran your slot-73 change against the retail title on the current main, and one thing to save you a rebase. Base d42773d07. 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.

The rebase. e7b32cd91 conflicts on today's main because the device work it carries has since landed on its own: slot 26 through #349, slot 48 through #350, slot 70 through #356, slot 25 through #362. Only your last commit f423c9046 (the slot 73 command-list IID) is still new, and that one cherry-picks onto d42773d07 with no conflicts, touching only d3d12_xs_device.cpp and xs_proxy_mock_test.cpp. Dropping the earlier commit from the branch looks enough to make this landable as is.

What it does to the title. Without it, d42773d07 stops exactly at this call: 13 recorded calls, #13 ID3D12Device::CreateCommandList failed, then the title's own assert 0x80000003. With f423c9046 applied, the title reaches 1644 recorded calls, 1619 ok, through ID3D12GraphicsCommandList::Close, XboxIDXGIDevice::GetAdapter, CreatePlacedResourceX (slot 133), CreateDescriptorHeap, ID3D12Device10::CreateCommittedResource3 and a batch of view-creation calls, and stops at the title assert 0x80000003 at game_scarlett_master.exe+0x247af2d — a point past every row in docs/retail_boot_chain.md. I posted that stop separately in the coordination issue.

The difference I can measure against the other open attempt on the same wall (#445, which maps the IID instead of retrying) is only in the failed-call count: here five CreateCommandList calls come back failed (#13, #17, #21, #25, #29) and the title continues past them, while the mapping version reports no failed CreateCommandList at all. Both reach the same stop, with the same following calls, so on this title the retry shape is not what holds it back — what matters is that the console IID stops being refused. I did not run xs_proxy_mock_test.cpp (I tested by running the title), and I did not check other hardware.

**@⁠fiestorra** on GitHub · 2026-11-24 07:09 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/359#issuecomment-7124675906) Ran your slot-73 change against the retail title on the current `main`, and one thing to save you a rebase. Base `d42773d07`. 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. **The rebase.** `e7b32cd91` conflicts on today's `main` because the device work it carries has since landed on its own: slot 26 through #349, slot 48 through #350, slot 70 through #356, slot 25 through #362. Only your last commit `f423c9046` (the slot 73 command-list IID) is still new, and that one cherry-picks onto `d42773d07` with no conflicts, touching only `d3d12_xs_device.cpp` and `xs_proxy_mock_test.cpp`. Dropping the earlier commit from the branch looks enough to make this landable as is. **What it does to the title.** Without it, `d42773d07` stops exactly at this call: 13 recorded calls, `#13 ID3D12Device::CreateCommandList failed`, then the title's own assert `0x80000003`. With `f423c9046` applied, the title reaches **1644 recorded calls, 1619 `ok`**, through `ID3D12GraphicsCommandList::Close`, `XboxIDXGIDevice::GetAdapter`, `CreatePlacedResourceX` (slot 133), `CreateDescriptorHeap`, `ID3D12Device10::CreateCommittedResource3` and a batch of view-creation calls, and stops at the title assert `0x80000003` at `game_scarlett_master.exe+0x247af2d` — a point past every row in `docs/retail_boot_chain.md`. I posted that stop separately in the coordination issue. The difference I can measure against the other open attempt on the same wall (#445, which maps the IID instead of retrying) is only in the failed-call count: here five `CreateCommandList` calls come back failed (#13, #17, #21, #25, #29) and the title continues past them, while the mapping version reports no failed `CreateCommandList` at all. Both reach the same stop, with the same following calls, so on this title the retry shape is not what holds it back — what matters is that the console IID stops being refused. I did not run `xs_proxy_mock_test.cpp` (I tested by running the title), and I did not check other hardware.
Author
Owner

@⁠x2Tweek on GitHub · 2026-11-24 09:39 UTC · original · reviewed

Tested PR #359's IID-free fallback approach on the retail executable (.exe 1.0.2.1), LEONIDA_D3D12=vulkan, RTX 5090.

Before the fix: boot crashes at trace #13, ID3D12Device::CreateCommandList failed — QueryInterface: unknown IID {c3827890-4024-474c-98cf-645b51dc4874}.

After applying PR #359's change (retry CreateCommandList with PC base IID __uuidof(ID3D12GraphicsCommandList) on E_NOINTERFACE when the requested IID is not a list IID): boot reaches trace #1644, stopping at CreateUnorderedAccessView. Exit still 0x80000003 but the blocker moved from CreateCommandList to resource creation.

This is the same outcome as PR #142's class-level approach (both reach resource creation, ~1600 D3D12 calls). PR #359's change is simpler — no new GUID constant, no d3d12_com.h include (which breaks xs_proxy_mock_test build on the root_sig_test target that lacks Vulkan headers), and doesn't change list_query_interface()/is_list_iid().

Next blocker after this fix: CreateUnorderedAccessView at trace #1644, guest-code crash mov dword ptr [rax], r8d with invalid rax at game_scarlett_master.exe+0x55e3b1, stack 100% game code, no gta6rt frames.

Tested on current upstream/main (1c93c8697) with the fix applied temporarily in a local worktree (reverted after testing; not committed).

**@⁠x2Tweek** on GitHub · 2026-11-24 09:39 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/359#pullrequestreview-6036842834) · **reviewed** Tested PR #359's IID-free fallback approach on the retail executable (.exe 1.0.2.1), LEONIDA_D3D12=vulkan, RTX 5090. Before the fix: boot crashes at trace #13, `ID3D12Device::CreateCommandList failed` — `QueryInterface: unknown IID {c3827890-4024-474c-98cf-645b51dc4874}`. After applying PR #359's change (retry CreateCommandList with PC base IID `__uuidof(ID3D12GraphicsCommandList)` on E_NOINTERFACE when the requested IID is not a list IID): boot reaches trace #1644, stopping at `CreateUnorderedAccessView`. Exit still 0x80000003 but the blocker moved from CreateCommandList to resource creation. This is the same outcome as PR #142's class-level approach (both reach resource creation, ~1600 D3D12 calls). PR #359's change is simpler — no new GUID constant, no `d3d12_com.h` include (which breaks `xs_proxy_mock_test` build on the `root_sig_test` target that lacks Vulkan headers), and doesn't change `list_query_interface()`/`is_list_iid()`. Next blocker after this fix: `CreateUnorderedAccessView` at trace #1644, guest-code crash `mov dword ptr [rax], r8d` with invalid `rax` at `game_scarlett_master.exe+0x55e3b1`, stack 100% game code, no gta6rt frames. Tested on current upstream/main (1c93c8697) with the fix applied temporarily in a local worktree (reverted after testing; not committed).
Author
Owner

@⁠hubeton on GitHub · 2026-11-24 13:23 UTC · original

Independent run of the current PR head d52ab6b5 on main@2d73c242, using Xbox 1.0.2.1 on native Windows 11 (26300.9974) with an RTX 3060 Ti, NVIDIA 621.24, and LEONIDA_D3D12=vulkan. Built with clang-cl 23.1.6 in RelWithDebInfo. xs_proxy_mock_test passed.

The previous unpatched build failed at slot 73 (CreateCommandListX, trace entry #13). With this PR, entry #13 succeeds and the run reaches entry #1639 (CreateUnorderedAccessView) before the title raises 0x80000003. This matches the existing reports and adds a native Windows Ampere result for the current IID-specific revision.

AI-assisted testing and report.

**@⁠hubeton** on GitHub · 2026-11-24 13:23 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/359#issuecomment-7132763418) Independent run of the current PR head `d52ab6b5` on `main@2d73c242`, using Xbox 1.0.2.1 on native Windows 11 (26300.9974) with an RTX 3060 Ti, NVIDIA 621.24, and `LEONIDA_D3D12=vulkan`. Built with clang-cl 23.1.6 in `RelWithDebInfo`. `xs_proxy_mock_test` passed. The previous unpatched build failed at slot 73 (`CreateCommandListX`, trace entry #13). With this PR, entry #13 succeeds and the run reaches entry #1639 (`CreateUnorderedAccessView`) before the title raises `0x80000003`. This matches the existing reports and adds a native Windows Ampere result for the current IID-specific revision. AI-assisted testing and report.
This discussion has been locked. Commenting is limited to contributors.
No description provided.