Repository navigation
Conversation
3c95a4a ("d3d12_xs: map the console list IID in QI and CreateCommandListX") added d3d12_xs_command_list_iid.h and wired it into list_query_interface and the slot-73 CreateCommandListX path. The commit is an ancestor of main, but the header is not in the tree and both wiring points forward the requested IID unchanged again: a later merge dropped them, the same kind of loss PR ProjectLeonida#131 restored for the DirectStorage shim. The retail executable asks slot 73 for the console command-list IID c3827890-4024-474c-98cf-645b51dc4874. Unmapped, the PC CreateCommandList refuses it and the title asserts on the failing HRESULT. - Restore the header byte-for-byte from 3c95a4a (the measured console->PC pair and its TomBox/Windows SDK provenance notes intact). - Map the requested IID in list_query_interface and in the slot-73 CreateCommandList call, adapted to the current ListProxy: wrap_list QIs through list_query_interface, so the proxy answers the console IID too. - xs_proxy_mock_test: a console-IID slot-73 case checks the mapped PC IID reaches CreateCommandList and the proxy's QI answers the console IID. Tests: xs_proxy_mock_test exits 0. On Windows 11 / RX 9070 XT with LEONIDA_D3D12=vulkan, gta6rt --run on a verified 1.0.2.1 package goes from 13 D3D12 calls (CreateCommandList refused, title assert) to 1,639 calls through command lists, committed resources and views before the next, unrelated assert. AI-assisted: Qwen4 Max Preview (Alibaba Token Plan).
|
Cross-links for the maintainers: issue #523 independently measured the same stop on the same base ( This PR's distinguishing point is the root cause: the mapping already existed ( |
fiestorra
left a comment
There was a problem hiding this comment.
Reviewing from my side (I have no write access on this repository, so this is a review, not a gate). Two things, and the second is a caution before merging.
Their history claim checks out
From a clone that carries upstream main as a remote:
git merge-base --is-ancestor 3c95a4a95 refs/remotes/succ/main— it is an ancestor ofmain.git cat-file -e 3c95a4a95:runtime/shims/d3d12_xs_command_list_iid.h— the blob is there, 3069 bytes.git log --oneline refs/remotes/succ/main -- runtime/shims/d3d12_xs_command_list_iid.h— empty.git grep -c c3827890 refs/remotes/succ/main -- runtime docs— no hits.maincarries neither the file nor the GUID.- I then scanned every merge in
3c95a4a95..main(457 of them) for one where a parent had the file and the merge result did not. There is exactly one:6dece9231"Merge TreXito's unmerged PRs: translator fixes, fuzzers, CPU emulation, xapu/chad shims" — parentd2d9b2657has the file, the merge tree does not. So the drop has an exact cause, and it is the same loss pattern PR #131 describes for the DirectStorage shim.
I also checked the PC half of the table against the installed SDK rather than taking it on trust: Include/10.0.26100.0/um/d3d12.h:31129 declares MIDL_INTERFACE("c3827890-e548-4cfa-96cf-5689a9370f80") ID3D12GraphicsCommandList6. The mapping is verifiable from the SDK. It also explains an oddity I had recorded about the console GUID — that it shares Data1 with IID_ID3D12GraphicsCommandList6 — which is what the same interface number looks like from the two sides.
Caution: my open PR #601 answers the same IID
#601 (mine) declares the same GUID inline in d3d12_xs_device.cpp, widens is_list_iid with it, answers it in list_query_interface without consulting the real object, and rebuilds the slot-73 call as ID3D12GraphicsCommandList when the console IID was asked. It touches runtime/shims/d3d12_xs_device.cpp and runtime/test/xs_proxy_mock_test.cpp — both of which this PR also touches — so the two cannot both merge without a conflict. Someone should pick one rather than merge both and resolve it by hand.
On the merits I think this PR is the better change and I would merge it and close mine:
- it restores a file the project already had, provenance notes intact (the GPL-3.0 measurement, the SDK version), instead of restating the constant inline;
- it maps the console IID onto a PC interface that genuinely exists, rather than answering an IID no PC object implements;
- mapping first leaves
is_list_iidandsupports_iidalone instead of widening both.
Two small things mine has that are worth carrying over, both optional: a one-line log naming the IID slot 73 was asked for (is_pc_command_list_iid covers the same ground from the other direction — and note it stops at ID3D12GraphicsCommandList7, so a title asking for L8 would take the "not in the table" branch and log once), and a docs/retail_boot_chain.md row for this wall, which this PR does not update. If this one merges, I will re-target the documentation part onto it and close #601: I would rather this land once, with the original header.
About the "next, unrelated assert" this run reaches
I have measured that rung on my own copy of the same package version, on an AMD host (gfx1036 iGPU, LEONIDA_D3D12=vulkan), and it is worth naming before someone else spends time on it:
- It is the title's own size check right after the first descriptor heap:
(end − start) + a title global, compared against0x1FFFFFatexe+0x247af14–exe+0x247af25, with theint 3atexe+0x247af2d. In my runs the span value is 64 MiB, picked from two constants the title selects (64 MiB / 82 MiB) through a flag read out of its own data; no allocation of that size appears anywhere in the run. - The record for that span is registered and retired by the title's own code (
exe+0x5c8f990, and the unlink in the routine starting atexe+0x5c8fa70), so it is not something the runtime leaked. The list it sits on is reachable two ways: directly, and as element 128 of a header table atexe+0x6843370indexed by bits 16..23 of a category value. Details in the tracking issue (results 7128602446 and 7128744918). LEONIDA_GUEST_POKE(the loader setting in #582,"<module basename>:<rva hex>:<hex bytes>",;-separated) lets anyone replaceCCwith90in one command. Suppressing both title traps takes the same boot past this assert and through device-table entries 25, 127, 20, 16, 62, 27, 39, 41, 61 and 70, the queue, fence and allocator proxies, and two heap allocations — and it then stops inside the runtime:0xC0000005inrt::d3d12::anonymous namespace'::Device::CreateMetaCommand, reached fromrt::d3d12_xs::anonymous namespace'::proxy_slot<61>, i.e. the console device table's entry 61 forwarded to the PC device's 61st slot. That is the rung after the one this PR uncovers, and it reads like the same console→PC mapping question, which is what #47's ladder is for.
I have not run this branch, so I am not reviewing the test case they added or the Wine behaviour.
Written with an AI assistant.
|
Measured on a second native-Windows machine, as support for merging this PR (fiestorra recommends it over the other slot-73 answers on #601). Windows 11, RTX 5070, driver 617.14, Stack: No game data: counts only. AI-assisted: yes (Claude Code, Sonnet 5.5) |
|
Thanks for the careful history work. The merge that dropped the header is well documented here. Closing it because
AI-assisted (Claude Code, Claude Opus 5.5). |
d3d12_xs: restore the console command-list IID mapping lost in a merge
Claimed in the coordination issue as: none exists yet — this PR is the claim, as with PR #2.
Relates to issue #47 (the boot ladder): the command-list IID wall its comments name after the
slot-26 and copy-queue stops.
AI-assisted: yes (Qwen4 Max Preview / Alibaba Token Plan).
What and why
3c95a4a95("d3d12_xs: map the console list IID in QI and CreateCommandListX") addedruntime/shims/d3d12_xs_command_list_iid.h— the measured console→PC IID pair for deviceslot 73 — and wired it into
list_query_interfaceand the slot-73 path. The commit is anancestor of main, but the header is not in the tree (
git ls-tree main -- runtime/shims/d3d12_xs_command_list_iid.his empty) and both wiring points forward therequested IID unchanged again. A later merge dropped them — the same loss pattern PR #131
restored for the DirectStorage shim.
The retail executable asks slot 73 (
CreateCommandListX) for the console command-list IIDc3827890-4024-474c-98cf-645b51dc4874. Unmapped, the PCCreateCommandListrefuses it(the Vulkan layer logs
QueryInterface: unknown IID), the slot returns a failing HRESULT,and the title asserts on it — a fatal
int3right after the call, confirmed statically withtools/int3_cause.py(the assert branches on the slot-73 result's sign).The change
3c95a4a95(blobfc149cea9); its provenancenotes (TomBox GPL-3.0 measurement, Windows SDK 10.0.26100.0) stay intact.
command_list_iid_for_pcinlist_query_interfaceand inthe slot-73
CreateCommandListcall, adapted to the currentListProxy:wrap_listQIsthrough
list_query_interface, so the wrapped proxy answers the console IID as well.xs_proxy_mock_test: a console-IID slot-73 case asserts the mapped PC IID(
ID3D12GraphicsCommandList6) reachesCreateCommandListand the proxy's QI answers theconsole IID.
No behavior change for PC IIDs or IIDs outside the table (forwarded unchanged, logged once,
as the original header documents).
Tested
Host: Windows 11, AMD Radeon RX 9070 XT, driver
32.0.32029.2010,LEONIDA_D3D12=vulkan.xs_proxy_mock_testbuilds and exits 0 with the new case.gta6rt --runon my own 1.0.2.1 package (108/108 files SHA-256 verified), main8f481cf16+ this change (the three touched files are byte-identical at21625bca8):CreateCommandListrefuses the console IID; the title'sfatal assert ends the run ~2.2 s in.
GetResourceAllocationInfo, slot 127CreateCommittedResource3, SRV/RTV/UAV creation —before the next, unrelated assert (a bounds check on a title global; a new rung on the
Stop 5 is the only unimplemented import left at 9ec34cdff, and the retail name is not the one the policy classifies #47 ladder, not a regression).
21625bca8; the header is byte-identical to the3c95a4a95blob. If main moves again, the two wiring points are small and local.
Checklist
export names and counts only; the IID is a public-interface identifier already named
in
3c95a4a95's public commit message).