Repository navigation
d3d12_xs_device: slot 73 creates the console ID3D12GraphicsCommandListX IID as ID3D12GraphicsCommandList (RT-XS-DEVICE-STOPS-7-9) - #359
Conversation
… 48 desc sanitize and slot 73 IID fallback (RT-XS-DEVICE-STOPS-7-9)
|
I tested the slot 73 fallback against the Vulkan backend from One public capability check regresses. Requesting I isolated your fallback on current main and included a small review patch against 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. |
# Conflicts: # runtime/shims/d3d12_xs_device.cpp # runtime/shims/d3d12_xs_device.h # runtime/test/xs_proxy_mock_test.cpp
…CommandList 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 <noreply@anthropic.com>
|
Ran your slot-73 change against the retail title on the current The rebase. What it does to the title. Without it, 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 |
There was a problem hiding this comment.
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 (1c93c86) with the fix applied temporarily in a local worktree (reverted after testing; not committed).
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 <noreply@anthropic.com>
#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 386d6ac. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent run of the current PR head The previous unpatched build failed at slot 73 ( AI-assisted testing and report. |
Brings 58 PRs integration did not have (among them ProjectLeonida#359 ProjectLeonida#360 ProjectLeonida#402 ProjectLeonida#497 ProjectLeonida#557 ProjectLeonida#558 ProjectLeonida#560 ProjectLeonida#561 ProjectLeonida#572 ProjectLeonida#573 ProjectLeonida#574 ProjectLeonida#577) and the newer heads of ProjectLeonida#401 and ProjectLeonida#404. 15 files conflicted; resolved by hand: - frame_pacer.h, d3d12_xs_device.h/.cpp: ProjectLeonida#402's pacer (per-event ticks, issue_token_locked) now issues from ProjectLeonida#414's shared FrameTokenSource, so a token from the device-side WaitFrameEventX is one the pacer accepts (towade's ProjectLeonida#14 finding: without it every PresentX is refused). The dead frame_next_token and issued_ counters are dropped. Queue slot 32 stays ProjectLeonida#414's PresentX; ProjectLeonida#402's presentation-handler routes serve slot 30 or LEONIDA_XS_PRESENT_X_SLOT. ProjectLeonida#402's GetFrameStatisticsX route moves into ProjectLeonida#385's route_xbox_device_slot. - acphal.cpp/acphal_test.cpp: upstream's reworked SHAPE allocation and release; the release writes nothing through its first argument, as ProjectLeonida#405 requires; both sides' tests kept. Upstream's ProjectLeonida#401/ProjectLeonida#404 heads remove lifecycle.cpp and the C++ xma2_decoder.cpp (replaced by runtime/xma_decoder), so build_runtime.ps1's cl.exe list drops them and keeps ProjectLeonida#549's and ProjectLeonida#400's files. - vulkan_backend.h, statistics_sum.comp, its SPIR-V header, d3d12_mesh_test, replay_query_edges_test, d3d12_vulkan_device.cpp, docs: ProjectLeonida#577's clipping counter on top of ProjectLeonida#540, which both sides carry; the Timestamps sentence keeps integration's corrected wording (c33ce87). - xs_proxy_mock_test.cpp: both sides' cases; pr_conflict_label.py keeps the guarded reconfigure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merges main at 1154976 into the integration branch at 273b3bd (merge base ece4ba5). 42 files conflicted; this commit is the resolution only. Build and test repairs follow in their own commits. Rule of resolution: where both sides added different things, both stay; where both made the same change in two forms, main's reviewed form stays and whatever #984's form did in addition is carried into it; where the two changed the same code for different purposes, both purposes are kept. Xbox proxy code (runtime/shims/d3d12_xs_device.cpp, d3d12_xs_device.h, d3d12_xs.cpp, d3d12_xs_alloc_size.h, d3d12_xs_desc_clean.h, registry.cpp): - d3d12_xs_device.cpp is #984's file with main's differing pieces ported in: env_slot and the configurable device routes, XboxQueueSlotRoutes, PresentationHandler / set_presentation_handler, the console caller rule for device slots 61 and 74 (#383, #385), route_xbox_device_slot, slot 81 as GetFrameStatisticsX, create_host_device, the console-form rule for slots 25 and 56, the console list IID of #359, and the forms of queue slot 18 (#403) and list slot 139 (#396). - Kept from #984: the list proxy with handle translation, queue slots 16/17 as Signal/Wait, the fence's completed-value mirror, the shared FrameTokenSource, PresentX through queue_present_x when no handler is attached (slot 30, or 32 on a queue detected as the newer layout), slots 27/53/55/57/70/71/133, the wider pc_resource_desc, S_OK for queue slots past the PC table. - Dropped: #984's GetFrameEventsX and LEONIDA_XS_FRAME_EVENTS_SLOT, its second-word rule for slot 61, its undetected-layout rule for queue slot 18, its list IID mapping to GraphicsCommandList6; main's copy of the base list proxy, its null-view slot 70 and its refusing slot 133. Proxy tests (runtime/test/xs_proxy_mock_test.cpp, device_proxy_test.cpp, queue_proxy_test.cpp): - Checks of both sides, each run once; main's forms of the render-target size and layout checks with #984's extra cases added; main's --env-slots-74 and #984's --env-slots-70. - Adapted to the merged code: the queue tail answers S_OK, slot 73 answers an unknown IID with the list proxy, the queue slot 18 case installs a console caller. Dropped: #984's slot 81 GetFrameEventsX cases. D3D12/Vulkan layer (runtime/shims/d3d12_com.cpp, d3d12_vulkan_device.cpp, runtime/src/command_list.h, frame_pacer.h, shader_library.h, vulkan_backend.h, vulkan_replay.h, runtime/test/command_list_test.cpp, d3d12_close_parity_test.cpp, d3d12_execute_indirect_validation_test.cpp, replay_texture_barrier_test.cpp, vk_pipeline_check.cpp, vk_test_device.h): - Resource::create_texture: #984's title images (deferred placed, pending streamed, title pool) and main's ordinary textures (#1413 shared blocks, #1364 staging fallback) are exclusive branches chosen by the texture's origin, so both pools run on disjoint sets of textures. - frame_pacer.h is main's pacer (#402) with #984's FrameTokenSource as the token counter. - main's forms kept for ExecuteIndirect (#1066, #377), the barrier into LAYOUT_UNDEFINED (#1055), the B4G4R4A4 stand-in, per-face stencil masks, the unaligned tile staging (#528) and the device-lost flag (#980). - shader_library.h: main's block inflate; #984's `bulk` parameter now defaults to true so main's callers keep it. - Dropped: #984's B8G8R8A8 stand-in for B4G4R4A4 targets, its refusal of separate stencil masks, its zero-count refusal in ExecuteIndirect, its wider UNDEFINED -> UNDEFINED release and the test case for it. Other shims (runtime/shims/dstorage.cpp, file_system.cpp, gameinput.cpp, xgameruntime_offline.cpp, runtime/test/xgameruntime_offline_test.cpp, xmem_test.cpp): - ReadFile and DirectStorage reads: #984's pinned kernel_writes read, then main's touch_pages retry on ERROR_NOACCESS. main's rt::fs::read_file is folded into #984's read_file. - gameinput: main's strict LEONIDA_INPUT_SCRIPT parser with #984's rsup/rsdown entries. - Speech synthesis: main's one silent voice and handle checks; #984's accept-anything form dropped. Build, tools, docs (runtime/CMakeLists.txt, runtime/cmake/translator_deps.cmake, scripts/build_runtime.ps1, make_game.py, tools/rdna2spirv.py, shader_disasm.py, shader_ir.py, shader_library.py, runtime/test/shaders/cs_imgload_tfe.asm, cs_imgload_d16_tfe.asm, docs/README.md, boot.md, d3d12_vulkan.md, runtime/README.md): - Unions of the test, target and source lists; spirv_loop_guard.py added to translator_deps.cmake. - rdna2spirv.py: main's DPP compare rule (#957), SMEM vcc base (#647) and widen_wave64_masks (#1021); #984's restore_skipped_instructions and restore_dot4_inline_sel. #984's duplicate widen_wave64_valu_masks dropped. - shader_disasm.py and shader_ir.py: main's structure with #984's one-line-per-dword llvm-mc input and wave flags. - shader_library.py: main's structure with #984's --compute-hashes and per-state compute variants. One file that did not conflict is changed here: tools/rdna2_decode.py. Git kept both sides' decoders for a VOPC compare with a DPP operand, and #984's narrower one shadowed main's; it is main's file again. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claimed in the coordination issue as: RT-XS-DEVICE-STOPS-7-9 (#14 (comment))
What and why
Reduced after review to what current
maindoes not already have. Slots 25/26 (the console's struct-return form) and 48 (CreateCommandQueueXdescriptor sanitizing) landed onmainin the meantime. The slot 58 forwarder is dropped: PC vtable slot 58 isID3D12Device5::RemoveDevice, notGetResourceAllocationInfo1(PC slot 56), and no call to Xbox slot 58 is measured.CreateCommandListX(slot 73,docs/retail_boot_chain.md§3.3): the title passes the consoleID3D12GraphicsCommandListXIID{c3827890-4024-474c-98cf-645b51dc4874}(measured in d3d12_xs: accept Xbox ID3D12GraphicsCommandListX IID in CreateCommandListX #445), which the PC device does not know. That IID is created asID3D12GraphicsCommandListin one call and handed out as the console list proxy, which also answersQueryInterfacefor it. Every other IID goes to the device unchanged.ID3D12GraphicsCommandList9on a revision-8 device) returnedS_OKand a base list. It now returnsE_NOINTERFACEwith a null output again.The slot 73 change in
d3d12_xs_device.cppis now #445's patch line for line, so the two merge cleanly in either order (checked withgit merge-treeand a test build of both merged, wherexs_proxy_mockandd3d12_vulkan_devicepass). This PR adds the tests and the docs.Tested
xs_proxy_mockandd3d12_vulkan_devicepass under CTest. New slot-73 checks:ID3D12GraphicsCommandList9and an unknown private IID keepE_NOINTERFACEwith a null output and one device call; the console IID is created once asID3D12GraphicsCommandListand is queryable on the proxy; a PC IID the device refuses is not retried. TheID3D12GraphicsCommandList9check fails on the previous head.GPUs tested: n/a (mock device)
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a)🤖 Generated with Claude Code