[PR #142] [CLOSED] d3d12_xs: answer the console command-list IID the retail executable asks for #194

Closed
opened 2026-11-26 20:17:05 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/142
Author: @Andretuta
Created: 11/24/2026
Status: ❌ Closed

Base: main ← Head: old-pr/9874


📝 Commits (2)

  • 5452535 d3d12_xs: answer the console command-list IID the retail executable asks for
  • 4c78082 d3d12_xs: cover the console list IID in xs_proxy_mock_test

📊 Changes

3 files changed (+47 additions, -3 deletions)

View changed files

📝 runtime/shims/d3d12_xs_device.cpp (+29 -3)
📝 runtime/shims/d3d12_xs_device.h (+4 -0)
📝 runtime/test/xs_proxy_mock_test.cpp (+14 -0)

📄 Description

Carried over from old PR 9874 by YuhiAida in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/9874, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
YuhiAida: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

d3d12_xs: answer the console command-list IID the retail executable asks for

What and why

Device slot 73 (CreateCommandListX) is handed the title's own command-list interface, measured on the retail
1.0.2.1 executable as {c3827890-4024-474c-98cf-645b51dc4874} — same first word as ID3D12GraphicsCommandList6
({c3827890-e548-4cfa-…}) but not that interface, and no PC list answers it.

The proxy passed that IID straight down to the layer, which answered E_NOINTERFACE (0x80004002). Every
CreateCommandList therefore failed, the title received a null list, and it read through the null.

Three changes, all in runtime/shims/d3d12_xs_device.cpp:

  • kConsoleListIID holds the measured GUID; is_list_iid() accepts it.
  • list_query_interface() skips the PC supports_iid check for it: no PC list can answer an Xbox IID, and the
    proxy answers it with itself.
  • proxy_create_command_list_x() creates the list with __uuidof(ID3D12GraphicsCommandList) and lets wrap_list()
    answer the console IID, instead of forwarding the title's IID to the layer.

Tested

Retail 1.0.2.1 executable, Wine 11.22, LEONIDA_D3D12=vulkan, NVIDIA RTX 3060 Ti (GA103), gta6rt --run:

before after
D3D12 calls 13 1,181
CreateCommandList fails, 0x80004002 581 created and closed
last call reached — XboxIDXGIDevice::GetAdapter (ok)

The run still stops later, in guest code (read 0x18 inside a static initialiser), which is a separate stop.

Depends on: #8461
Depends on: #6964

Measured on top of those two and of the one-line gameinput.dll!#1 ordinal alias (not a PR; the retail executable
imports GameInput by ordinal, so the registry never matched the shim). main alone stops earlier, at the DStorage
assert, so this change cannot show its effect without them.

Test

runtime/test/xs_proxy_mock_test.cpp: slot 73 with kConsoleListIID -> the proxy answers QueryInterface,
and PC slot 12 receives ID3D12GraphicsCommandList. CI runs it.

Item

New item. The claiming: line for the coordination issue could not be posted: this account is not a collaborator,
and the repository restricts interactions to collaborators. Whoever lands this should list it there.

Note

main at this commit does not compile for clang-cl: DescriptorHeap/identity() in
d3d12_vulkan_device.cpp and the SHAPE_* static asserts in acphal.cpp. Those are unrelated to this change and
reported separately.

AI-assisted.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/142 **Author:** [@Andretuta](https://github.com/Andretuta) **Created:** 11/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `old-pr/9874` --- ### 📝 Commits (2) - [`5452535`](https://github.com/ubiquitarianism/leonida/commit/545253542f34bea5ba4e4a00452934fff1e3e0a3) d3d12_xs: answer the console command-list IID the retail executable asks for - [`4c78082`](https://github.com/ubiquitarianism/leonida/commit/4c780823a9c93614e6af581070ebbbe746a0955c) d3d12_xs: cover the console list IID in xs_proxy_mock_test ### 📊 Changes **3 files changed** (+47 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `runtime/shims/d3d12_xs_device.cpp` (+29 -3) 📝 `runtime/shims/d3d12_xs_device.h` (+4 -0) 📝 `runtime/test/xs_proxy_mock_test.cpp` (+14 -0) </details> ### 📄 Description > Carried over from **old PR 9874** by `YuhiAida` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/9874`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > `YuhiAida`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): d3d12_xs: answer the console command-list IID the retail executable asks for # What and why Device slot 73 (`CreateCommandListX`) is handed the title's own command-list interface, measured on the retail 1.0.2.1 executable as `{c3827890-4024-474c-98cf-645b51dc4874}` — same first word as `ID3D12GraphicsCommandList6` (`{c3827890-e548-4cfa-…}`) but not that interface, and no PC list answers it. The proxy passed that IID straight down to the layer, which answered `E_NOINTERFACE` (`0x80004002`). Every `CreateCommandList` therefore failed, the title received a null list, and it read through the null. Three changes, all in `runtime/shims/d3d12_xs_device.cpp`: - `kConsoleListIID` holds the measured GUID; `is_list_iid()` accepts it. - `list_query_interface()` skips the PC `supports_iid` check for it: no PC list can answer an Xbox IID, and the proxy answers it with itself. - `proxy_create_command_list_x()` creates the list with `__uuidof(ID3D12GraphicsCommandList)` and lets `wrap_list()` answer the console IID, instead of forwarding the title's IID to the layer. ## Tested Retail 1.0.2.1 executable, Wine 11.22, `LEONIDA_D3D12=vulkan`, NVIDIA RTX 3060 Ti (GA103), `gta6rt --run`: | | before | after | |---|---|---| | D3D12 calls | 13 | **1,181** | | `CreateCommandList` | fails, `0x80004002` | 581 created and closed | | last call reached | — | `XboxIDXGIDevice::GetAdapter` (ok) | The run still stops later, in guest code (`read 0x18` inside a static initialiser), which is a separate stop. Depends on: `#8461` Depends on: `#6964` Measured on top of those two and of the one-line `gameinput.dll!#1` ordinal alias (not a PR; the retail executable imports GameInput by ordinal, so the registry never matched the shim). `main` alone stops earlier, at the DStorage assert, so this change cannot show its effect without them. ## Test `runtime/test/xs_proxy_mock_test.cpp`: slot 73 with `kConsoleListIID` -> the proxy answers QueryInterface, and PC slot 12 receives `ID3D12GraphicsCommandList`. CI runs it. ## Item New item. The `claiming:` line for the coordination issue could not be posted: this account is not a collaborator, and the repository restricts interactions to collaborators. Whoever lands this should list it there. ## Note `main` at this commit does not compile for clang-cl: `DescriptorHeap`/`identity()` in `d3d12_vulkan_device.cpp` and the `SHAPE_*` static asserts in `acphal.cpp`. Those are unrelated to this change and reported separately. AI-assisted. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:17:05 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#194
No description provided.