Repository navigation
d3d12_xs: device slot 74 returns S_OK instead of reaching ShaderCacheControl, again (RT-SLOT74) - #385
Conversation
|
Native Windows check of
The slot 74 stand-in also intercepts the PC call. Can slot 74 use the caller classification introduced for slot 61 in #383, with a host passthrough test alongside the guest case? The route-override precedence exercised by All seven AI-assisted. The probe uses a mock PC device. No game files used. |
|
You are right, and thank you for testing the host path: the stand-in took a host's Fixed in
Checked on the retail boot as well, since the classifier now decides it: the title's call still gets the stand-in (the #391, #395 and #396 are rebased onto this. AI-assisted. |
…stack Contains ProjectLeonida#375 ProjectLeonida#377 ProjectLeonida#383 ProjectLeonida#385 ProjectLeonida#391 ProjectLeonida#395 ProjectLeonida#396 ProjectLeonida#403 ProjectLeonida#414 ProjectLeonida#416 ProjectLeonida#427 ProjectLeonida#430 ProjectLeonida#432. # Conflicts: # runtime/shims/d3d12_com.cpp # runtime/shims/d3d12_vulkan_device.cpp # runtime/src/command_list.h
… of reaching PC ShaderCacheControl (#7231) The retail title calls slot 74 once; the PC slot 74 reads the first pointer as kinds and returns E_INVALIDARG, so the title hits an int3. The proxy handler does not call the PC device, writes nothing, logs the three words once, and yields to an env slot override that moves a route onto 74. (cherry picked from commit cdeee35) Adapted to main by Mumogg: the queue route inside route_xbox_device_slot calls proxy_create_command_queue_xbox (the 32-byte description of 0cde63d), as the inline route did before this commit moved the routes into a function.
…gets PC ShaderCacheControl The stand-in also took a host's ID3D12Device9::ShaderCacheControl call through the proxy and answered S_OK without reaching the device (found on native Windows by BadgersMC in the review of this change). Slot 74 now asks the caller classifier slot 61 uses (set_console_caller): a caller in an image the guest loader mapped gets the stand-in, any other caller, and every caller when no classifier is installed, is forwarded to the PC slot 74 or refused past the PC device's table. xs_proxy_mock_test: the guest case under a classifier, and the host case with a classifier and with none, on a device that has ShaderCacheControl and on one that does not. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt
Asked for in review on ProjectLeonida#377. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt
6a9edfe to
3ca10df
Compare
|
Confirmed on native Windows with the same typed All seven |
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>
…ts 86, 101 and 108 to PC Device2/Device5/Device8, rebased on main Conflicts with integration's ProjectLeonida#385 helper and the fold, resolved by hand: the dispatcher calls route_xbox_device_slot first and then ProjectLeonida#727's if-constexpr branches for 86/101/108; device_slot_overridden and its comment list both sides' slots; xs_proxy_mock_test keeps integration's slot 41/61 checks and adds ProjectLeonida#727's 86/101/108 cases. Supersedes the local boot-standins slot-108 stand-in (a821895ad). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three files conflicted; in each, both sides had added something and both are kept. runtime/shims/d3d12_xs_device.cpp: this branch moved the Xbox device slot routes into route_xbox_device_slot(), which slot 74's handler asks first, while main added a sixth route to the inline chain: GetFrameStatisticsX (routes.frame_statistics, slot 81), answered by the presentation handler or with S_FALSE and a zero count. The helper is kept and that route is moved into it unchanged, between wait_event and queue_x as on main. runtime/test/xs_proxy_mock_test.cpp: run_env_slots keeps this branch's on_slot74 parameter next to main's EnvPresenter struct, and main() runs check_slot74() and then check_presentation_wiring(). docs/d3d12_vulkan.md: both table rows, in slot order (74, then 81). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Merged. Mumogg is still away and this is the next rung on What it does: device slot 74, called by the title as Conflicts: three files, and one of them needed more than keeping two additions side by side, so please look at it.
Holds and requests: none from a maintainer on this PR. BadgersMC's request (the caller classification from #383, a host passthrough test, and coverage of the override precedence) was answered in Tests (clang-cl with the xwin SDK; Wine, headless; llvmpipe and an RDNA2 iGPU):
Follow-ups, none blocking the boot path:
#727 (device slots 86, 101 and 108) is the next rung. AI-assisted (Claude Code, Claude Fable 5.2 and Claude Opus 5.5). |
Three files conflicted; in each, both sides had added something and both are kept. runtime/shims/d3d12_xs_device.cpp: this branch still had the Xbox device slot routes inline, followed by its fixed handlers for slots 86, 101 and 108; main has since moved the same six routes into route_xbox_device_slot() (ProjectLeonida#385). The generic path now calls the helper and then the three fixed handlers, so a configured route still wins over them, as this branch's second commit intends. device_slot_overridden() has main's list plus 86, 101 and 108. runtime/shims/d3d12_xs_device.h: the comment lists both sides' slots. runtime/test/xs_proxy_mock_test.cpp: the mock device keeps main's case 13 (CheckFeatureSupport) and this branch's case 68 (GetResourceAllocationInfo2); check_xbox_slots keeps main's slot 41 and 61 cases, one combined list of handled slots, and this branch's slot 86, 101 and 108 cases. Co-Authored-By: Claude Fable 5.2 <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 #14 as
RT-SLOT74. Depends on: #349, #350, #356, #362, #369, #375, #377, #383 (their commits come first here; this pull request is the last commit).What and why
After #383 the title calls device slot 74 once, with
(pointer, u32, pointer).mainforwards it by number to the PC slot 74,ID3D12Device9::ShaderCacheControl, which reads the first word as its flags and fails; the title then stops on its ownint3.Commit
cdeee35aaby tedin7 (-x, authorship kept; an ancestor ofmainwhose content is not in the tree) gives the slot a handler that does not call the PC device, writes nothing through the pointers and returnsS_OK. It is a stand-in: what the console call does is not measured, and the commit says so.The commit also moves the Xbox slot routes into one function (
route_xbox_device_slot) so that an environment override which moves a route onto slot 74 wins over the built-in handler. Adapted tomain, as the commit message says: inside that function the queue route callsproxy_create_command_queue_xbox, the 32-byte description of #350.Measured
Linux (Nobara 44, kernel 7.3), Wine 11.21 staging, RTX 5070 Ti (driver 615.78.08), clang-cl 22.1.8 + xwin SDK 10.0.26100, own 1.0.2.1 copy, network off, on
mainece4ba5b3, with #142 and #328 applied on top for the boot runs (they are not in this branch).--runint3afterShaderCacheControlfailsOf the 11,916, 10,241 are
ID3D12Device5::CreateLifetimeTracker, which the layer answers as unsupported; the title goes on regardless. Past this stop the log shows the DirectStorage shim in use (CreateStatusArray,CreateQueue1, zlib requests inflated on the CPU), the first call of device slot 67 (the console's compute pipeline from native code) and of slot 57.The next stop is device slot 108, past the PC device table. #219 looks like the pull request for it; I will measure it on top of this and report there.
xs_proxy_mock_testunder Wine: the default run passes with the new slot 74 case, and--env-slots,--env-slots-invalidand the new--env-slots-74exit 0.Not built with MSVC and not run on Windows.
AI-assisted (Claude Code); built and run on the machine above.
🤖 Generated with Claude Code
https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt