D3D12.X: unknown_iids lists only the title's QueryInterface misses #1640

Open
M3lonade wants to merge 1 commit from upstream-pr/1650 into main
M3lonade commented 2026-11-24 18:42:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by M3lonade on 2026-11-24T18:42:01Z.


The unknown_iids list in report.json (and the WARN "QueryInterface(…) – interface unknown on the PC (console-only?)") recorded every QueryInterface miss on an adopted D3D12 object, from any caller. For the retail title (1.0.2.1) all 13 listed IIDs come from the runtime, not the title: 11 in one burst while XCL creates its swap chain (DXGI probing the adopted queue: IDXGIDevice, IDXGIObject, ID3D11Device, ID3D11Debug, ID3D11On12Device, …), the others from D3D12. A byte search finds 12 of the 13 GUIDs nowhere in the game's executable or its 16 DLLs; the 13th, IDXGIDevice, is in the executable, but XCL already answers the title's request for it (dev_qi_x), so the listed miss was DXGI's. The list is meant as evidence of console-only interfaces the title asks for, and reports keep quoting these 13 (e.g. #534). Now only the title's misses are listed.

What is in it

  • crates/xcl/src/hle/d3d12x/real.rs:
    • QueryInterface (#0) of adopted objects becomes guard::make_split(qi_override, PC method): calls from a game image are forwarded and a miss is listed (note_unknown_iid, factored out of qi_override); the runtime's go straight to the PC method. The device's console split (dev_qi_x) wraps it as before.
    • A device child's GetDevice gets the same split (get_device_title): the PC answers it with the device's QueryInterface from inside D3D12, which is the runtime's side there.
    • create_device lists a miss of the title's riid.
  • title_list.rs, dxgi_device.rs, shader_cache_session.rs: XCL's objects that pass the title's riid on from XCL's code list a miss themselves.
  • Tests:
    • real::unknown_iid_tests::query_interface_misses_are_listed_for_the_title_only and get_device_misses_are_listed_for_the_title_only call the slots both from the test (the runtime) and through a stub in memory registered as a game image. Hardware device or WARP, so they run without a GPU.
    • title_list::tests::a_titles_query_interface_miss_through_a_console_list_is_listed, dxgi_device::tests::a_titles_query_interface_miss_through_the_dxgi_device_is_listed, and a check added to shader_cache_session::tests::rejected_create_shader_cache_session_falls_back_to_working_in_memory_session.
    • Removing any one of the five parts (the #0 split, the GetDevice split, each forwarder's note_unknown_iid) fails its test. On main the #0 test fails with "a QueryInterface miss of the runtime was listed as the title's".

Tested

  • NVIDIA GeForce RTX 4080 SUPER 16 GB (driver 621.24, 32-lane waves), Ryzen 7 9700X, Windows 11 Pro 26200, Rust 1.98.0; tests debug, title release.
  • cargo build --workspace + cargo test --workspace -- --test-threads=4: 780 passed, 0 failed, 41 ignored.
  • SKIPPED on this adapter: gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask (no wave64), gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware (no wave64), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • Retail title 1.0.2.1, 60 s smoke runs: d3d12.unknown_iids 13 on main 9e3831e1, 0 with this change; the 13 WARN lines are gone, the swap chain is made as before.

Regression run

main 9e3831e1:

xcl-smoke v1
commit: 9e3831e1f570d3646e53ab753b19ec07eb8f1485
gpu: NVIDIA GeForce RTX 4080 SUPER
title: 2f5362b1
seconds: 60
exit: 0x0
frames shown: 1629 (PresentX 1629)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 17030 MB

this PR cd1b7681:

xcl-smoke v1
commit: cd1b76816aec8242ea94459c430c79f9d0d98c0d
gpu: NVIDIA GeForce RTX 4080 SUPER
title: 2f5362b1
seconds: 60
exit: 0x0
frames shown: 1657 (PresentX 1657)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16030 MB

Not tested

  • A title that asks for a console-only IID: the retail title asks for none, so the title's side is covered by the unit tests only (the e2e title is not extended).
  • D3D12CreateDevice's note (create_device) has no test of its own.
  • A title QueryInterface that a PC method other than GetDevice makes internally with the title's riid: it comes from D3D12 and is no longer listed.
  • Wine / vkd3d-proton, AMD and Intel GPUs.

HANDOFF.md:334 suspects QueryInterface(0742a90b…) comes from the PC runtime: it does, and it is no longer logged.

AI use

  • Claude Code (Claude Opus 5.5): found the cause from the retail title's logs, wrote the change and the tests, ran the tests and the regression runs, and wrote this description. Reviewed by three further Claude Opus 5.5 agents; their findings (an untested title side, GetDevice, the untested forwarders) are addressed above.
<!-- greyfinch-sync:ivall/xcl:issue:5478195427 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1650). Originally posted by [M3lonade](https://github.com/M3lonade) on 2026-11-24T18:42:01Z. --- The `unknown_iids` list in report.json (and the WARN "QueryInterface(…) – interface unknown on the PC (console-only?)") recorded every QueryInterface miss on an adopted D3D12 object, from any caller. For the retail title (1.0.2.1) all 13 listed IIDs come from the runtime, not the title: 11 in one burst while XCL creates its swap chain (DXGI probing the adopted queue: IDXGIDevice, IDXGIObject, ID3D11Device, ID3D11Debug, ID3D11On12Device, …), the others from D3D12. A byte search finds 12 of the 13 GUIDs nowhere in the game's executable or its 16 DLLs; the 13th, IDXGIDevice, is in the executable, but XCL already answers the title's request for it (`dev_qi_x`), so the listed miss was DXGI's. The list is meant as evidence of console-only interfaces the title asks for, and reports keep quoting these 13 (e.g. #534). Now only the title's misses are listed. **What is in it** - `crates/xcl/src/hle/d3d12x/real.rs`: - QueryInterface (#0) of adopted objects becomes `guard::make_split(qi_override, PC method)`: calls from a game image are forwarded and a miss is listed (`note_unknown_iid`, factored out of `qi_override`); the runtime's go straight to the PC method. The device's console split (`dev_qi_x`) wraps it as before. - A device child's GetDevice gets the same split (`get_device_title`): the PC answers it with the device's QueryInterface from inside D3D12, which is the runtime's side there. - `create_device` lists a miss of the title's riid. - `title_list.rs`, `dxgi_device.rs`, `shader_cache_session.rs`: XCL's objects that pass the title's riid on from XCL's code list a miss themselves. - Tests: - `real::unknown_iid_tests::query_interface_misses_are_listed_for_the_title_only` and `get_device_misses_are_listed_for_the_title_only` call the slots both from the test (the runtime) and through a stub in memory registered as a game image. Hardware device or WARP, so they run without a GPU. - `title_list::tests::a_titles_query_interface_miss_through_a_console_list_is_listed`, `dxgi_device::tests::a_titles_query_interface_miss_through_the_dxgi_device_is_listed`, and a check added to `shader_cache_session::tests::rejected_create_shader_cache_session_falls_back_to_working_in_memory_session`. - Removing any one of the five parts (the #0 split, the GetDevice split, each forwarder's `note_unknown_iid`) fails its test. On `main` the #0 test fails with "a QueryInterface miss of the runtime was listed as the title's". **Tested** - NVIDIA GeForce RTX 4080 SUPER 16 GB (driver 621.24, 32-lane waves), Ryzen 7 9700X, Windows 11 Pro 26200, Rust 1.98.0; tests debug, title release. - `cargo build --workspace` + `cargo test --workspace -- --test-threads=4`: 780 passed, 0 failed, 41 ignored. - SKIPPED on this adapter: `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask` (no wave64), `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware` (no wave64), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - Retail title 1.0.2.1, 60 s smoke runs: `d3d12.unknown_iids` 13 on `main` `9e3831e1`, 0 with this change; the 13 WARN lines are gone, the swap chain is made as before. **Regression run** main `9e3831e1`: ``` xcl-smoke v1 commit: 9e3831e1f570d3646e53ab753b19ec07eb8f1485 gpu: NVIDIA GeForce RTX 4080 SUPER title: 2f5362b1 seconds: 60 exit: 0x0 frames shown: 1629 (PresentX 1629) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 17030 MB ``` this PR `cd1b7681`: ``` xcl-smoke v1 commit: cd1b76816aec8242ea94459c430c79f9d0d98c0d gpu: NVIDIA GeForce RTX 4080 SUPER title: 2f5362b1 seconds: 60 exit: 0x0 frames shown: 1657 (PresentX 1657) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16030 MB ``` **Not tested** - A title that asks for a console-only IID: the retail title asks for none, so the title's side is covered by the unit tests only (the e2e title is not extended). - `D3D12CreateDevice`'s note (`create_device`) has no test of its own. - A title QueryInterface that a PC method other than GetDevice makes internally with the title's riid: it comes from D3D12 and is no longer listed. - Wine / vkd3d-proton, AMD and Intel GPUs. `HANDOFF.md:334` suspects `QueryInterface(0742a90b…)` comes from the PC runtime: it does, and it is no longer logged. **AI use** - Claude Code (Claude Opus 5.5): found the cause from the retail title's logs, wrote the change and the tests, ran the tests and the regression runs, and wrote this description. Reviewed by three further Claude Opus 5.5 agents; their findings (an untested title side, GetDevice, the untested forwarders) are addressed above.
DavidM1911 commented 2026-11-24 21:09:54 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T21:07:00Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7144496709 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1650#issuecomment-7144496709). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T21:07:00Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~22 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified `main`.) Thanks!
JJAutoCompare commented 2026-11-25 05:08:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T04:55:41Z.


XCL PR #1650 on Intel Arc A770

Clean detached head cd1b76816aec8242ea94459c430c79f9d0d98c0d on STOR-WINLAB. AMD Ryzen 7 3800X, Intel Arc A770 (driver 32.0.101.9175), Windows 11 x64 build 26200.9974, DXC 1.9.2609.5, rustc 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). Dev and test profiles ran with debug info and incremental compilation disabled.

Tested

  • cargo build --workspace and cargo test --workspace --no-run succeeded outside the Arc mutex. The latter built 19 test executables.
  • cargo test -p xcl --lib a_titles_query_interface_miss_through_a_console_list_is_listed -- --nocapture passed 1 test outside the mutex with XCL_ADAPTER=NONE_CPU_ONLY. The console-list wrapper recorded a forwarded title IID miss.
  • Under Invoke-ArcTest.ps1 with XCL_ADAPTER=A770, cargo test -p xcl --lib unknown_iid_tests -- --nocapture passed 2 tests. An adopted D3D12 command allocator recorded title misses through QueryInterface and GetDevice, excluded runtime misses, and returned the expected objects for supported IIDs.
  • Under the same mutex and setting, cargo test -p xcl --lib dxgi_device::tests -- --nocapture and cargo test -p xcl --lib shader_cache_session::tests -- --nocapture each passed 1 test. They verified recording of a forwarded title miss through the DXGI device and the in-memory shader-cache session. Across all five focused tests there were zero failures, ignored tests, or skips.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 ran once under the Arc mutex with XCL_ADAPTER=A770 and RUST_TEST_NOCAPTURE=1. All five PR tests passed again.

Workspace failures and skips

The suite exited 1. The 20 test result: lines in pr1650-suite.log (19 binaries plus doc-tests) sum to 764 passed, 16 failed, and 41 ignored. Six lines start with SKIPPED and are excluded from coverage. The skip reasons were no wave64 (2), tiled resources tier below 2 (1), missing D3D12 debug layer (2), and no heap windows (1).

Of the 15 recompiler unit failures, 11 reported CreateComputePipelineState error 0x80070057 and four reported output mismatches. The e2e test failed its RSSetDepthBiasX check (blue pixel, expected green).

Not tested

Matched main baseline, retail-title smoke, or other GPU vendors. Regression status remains undetermined.

AI use

T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr1650-suite.log and published.

<!-- greyfinch-sync:ivall/xcl:comment:7153290091 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1650#issuecomment-7153290091). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T04:55:41Z. --- # XCL PR #1650 on Intel Arc A770 Clean detached head `cd1b76816aec8242ea94459c430c79f9d0d98c0d` on STOR-WINLAB. AMD Ryzen 7 3800X, Intel Arc A770 (driver 32.0.101.9175), Windows 11 x64 build 26200.9974, DXC 1.9.2609.5, rustc 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). Dev and test profiles ran with debug info and incremental compilation disabled. **Tested** - `cargo build --workspace` and `cargo test --workspace --no-run` succeeded outside the Arc mutex. The latter built 19 test executables. - `cargo test -p xcl --lib a_titles_query_interface_miss_through_a_console_list_is_listed -- --nocapture` passed 1 test outside the mutex with `XCL_ADAPTER=NONE_CPU_ONLY`. The console-list wrapper recorded a forwarded title IID miss. - Under `Invoke-ArcTest.ps1` with `XCL_ADAPTER=A770`, `cargo test -p xcl --lib unknown_iid_tests -- --nocapture` passed 2 tests. An adopted D3D12 command allocator recorded title misses through `QueryInterface` and `GetDevice`, excluded runtime misses, and returned the expected objects for supported IIDs. - Under the same mutex and setting, `cargo test -p xcl --lib dxgi_device::tests -- --nocapture` and `cargo test -p xcl --lib shader_cache_session::tests -- --nocapture` each passed 1 test. They verified recording of a forwarded title miss through the DXGI device and the in-memory shader-cache session. Across all five focused tests there were zero failures, ignored tests, or skips. - `cargo test --workspace --no-fail-fast -- --test-threads=4` ran once under the Arc mutex with `XCL_ADAPTER=A770` and `RUST_TEST_NOCAPTURE=1`. All five PR tests passed again. **Workspace failures and skips** The suite exited 1. The 20 `test result:` lines in `pr1650-suite.log` (19 binaries plus doc-tests) sum to 764 passed, 16 failed, and 41 ignored. Six lines start with `SKIPPED ` and are excluded from coverage. The skip reasons were no wave64 (2), tiled resources tier below 2 (1), missing D3D12 debug layer (2), and no heap windows (1). Of the 15 recompiler unit failures, 11 reported `CreateComputePipelineState` error `0x80070057` and four reported output mismatches. The e2e test failed its `RSSetDepthBiasX` check (blue pixel, expected green). **Not tested** Matched main baseline, retail-title smoke, or other GPU vendors. Regression status remains undetermined. **AI use** T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr1650-suite.log` and published.
github-actions[bot] commented 2026-11-28 20:18:02 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-28T20:18:02Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7245184649 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1650#issuecomment-7245184649). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T20:18:02Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 06:23:58 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:23:58Z.


Triage (#1607) – head cd1b768

No open or merged PR restricts unknown_iids to the title's QueryInterface misses. Main has since added dev_qi_x (the device's console QueryInterface slot that hands out the IDXGIDevice), which calls qi_override directly, so after a rebase the device path has to be checked so it still lists the title's misses and does not double-wrap slot 0.
No problems found in the diff itself.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7302826634 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1650#issuecomment-7302826634). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:23:58Z. --- **Triage (#1607)** – head cd1b768 No open or merged PR restricts `unknown_iids` to the title's QueryInterface misses. Main has since added `dev_qi_x` (the device's console QueryInterface slot that hands out the IDXGIDevice), which calls `qi_override` directly, so after a rebase the device path has to be checked so it still lists the title's misses and does not double-wrap slot 0. No problems found in the diff itself. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1650:upstream-pr/1650'
git switch 'upstream-pr/1650'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1650'
git switch 'upstream-pr/1650'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1650'
git switch 'upstream-pr/1650'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1650'
git switch 'main'
git merge --squash 'upstream-pr/1650'
git switch 'main'
git merge --ff-only 'upstream-pr/1650'
git switch 'main'
git merge 'upstream-pr/1650'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
xcl-dev/xcl!1640
No description provided.