d3d12_xs: device slot 74 returns S_OK instead of reaching ShaderCacheControl, again (RT-SLOT74) #385
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!385
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/385/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Mumogg on GitHub · 2026-11-24 04:17 UTC · original
Mumogg:slot74-stand-in→main· +135 −45 · 5 files · 4 commits · merged 2026-11-24 23:16 UTCClaimed 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
@BadgersMC on GitHub · 2026-11-24 04:29 UTC · original
Native Windows check of
25826cddagainst its parent6d4cf2ce(Windows 11 26100, MSVC 19.44, Windows SDK 26100). I queried the level-9 mock device proxy forID3D12Device9, classified the caller as host, and calledShaderCacheControl(APPLICATION_MANAGED, ENABLE)through the typed interface.6d4cf2ceS_OK25826cddS_OKThe 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
xs_proxy_mock_env_slots_74also needs coverage.All seven
xs_proxy_mock*CTest cases passed at25826cdd.device_proxyanddevice_proxy_tracefailed the slot 25 allocation-info assertions on both revisions. On an RTX 3060 Ti,d3d12_vulkan_devicealso failed the same tiled resource allocation comparison on both revisions.AI-assisted. The probe uses a mock PC device. No game files used.
@Mumogg on GitHub · 2026-11-24 04:37 UTC · original
You are right, and thank you for testing the host path: the stand-in took a host's
ShaderCacheControlas well.Fixed in
6a9edfe37on this branch. Slot 74 now asks the same 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 when the device has no slot 74. The route-override precedence is unchanged (--env-slots-74still passes).xs_proxy_mock_testhas the cases you asked for: the guest case under a classifier, and the host case both with a classifier and with none, on a level-9 device (the call reaches the mock's slot 74 with its words) and on a level-0 one (refused, the mock is not called). It passes under Wine.Checked on the retail boot as well, since the classifier now decides it: the title's call still gets the stand-in (the
slot 74 ... returns S_OKline appears once, noShaderCacheControlin the trace) and the run reaches the same point as before.#391, #395 and #396 are rebased onto this.
AI-assisted.
@BadgersMC on GitHub · 2026-11-24 12:09 UTC · original
Confirmed on native Windows with the same typed
ID3D12Device9::ShaderCacheControl(APPLICATION_MANAGED, ENABLE)probe as before. On current head3ca10dfe(the rebased caller-classification fix isad9edee6), it returnsS_OKand forwards exactly one call with both flags intact. This is the same probe that saw zero forwarded calls on25826cdd.All seven
xs_proxy_mock*cases pass with MSVC, includingxs_proxy_mock_env_slots_74. Windows 11 build 26100, MSVC 19.44, Windows SDK 26100. AI-assisted mock tests, no game files.@aslan2142 on GitHub · 2026-11-24 23:16 UTC · original
Merged. Mumogg is still away and this is the next rung on
main's boot path (device slot 74, where the title stops once #383 is in), so I brought the branch up to date the same way as the three rungs before it: one merge commit ofmain(d9f0a98e1) on top of3ca10dfe1(d7e294475). Mumogg's three commits are untouched and nothing was force-pushed.What it does: device slot 74, called by the title as
(pointer, u32, pointer), now returnsS_OKinstead of reaching the PCShaderCacheControl, which failed and sent the title to its ownint3. A host caller, and every caller when no classifier is installed, still getsID3D12Device9::ShaderCacheControl. It is a stand-in: nothing is written through the pointers, and the call is logged once with its three words.Conflicts: three files, and one of them needed more than keeping two additions side by side, so please look at it.
runtime/shims/d3d12_xs_device.cpp: this branch moved the Xbox device slot routes intoroute_xbox_device_slot(), which slot 74's handler asks first. Meanwhilemainhad added a sixth route to the old inline chain:GetFrameStatisticsX(routes.frame_statistics, slot 81), answered by the presentation handler, or withS_FALSEand a zero count when there is none. I kept the helper and moved that route into it unchanged, betweenwait_eventandqueue_xas onmain. All six routes were then compared line by line withmain's chain: same arguments, same log names, same results, same order.runtime/test/xs_proxy_mock_test.cpp:run_env_slotskeeps this branch'son_slot74parameter next tomain'sEnvPresenterstruct, andmain()runscheck_slot74()and thencheck_presentation_wiring().docs/d3d12_vulkan.md: both table rows, in slot order (74, then 81).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
ad9edee61, and they confirmed it on Windows with MSVC.Tests (clang-cl with the xwin SDK; Wine, headless; llvmpipe and an RDNA2 iGPU):
main(the tree of #383's merge): nothing changed on either device except the newxs_proxy_mock_env_slots_74, which passes on both (259 pass and 15 fail on llvmpipe, 255 and 21 on the iGPU).xs_proxy_mockand its six variants pass on both. They includemain's presenter checks, which now reachGetFrameStatisticsXthrough the helper, at the default slot and at an overridden one.test_docs_*files andcheck_no_game_data.pyon the changed files are clean. The Linux portable subset does not build these files.Follow-ups, none blocking the boot path:
note_slot(74).#727 (device slots 86, 101 and 108) is the next rung.
AI-assisted (Claude Code, Claude Fable 5.2 and Claude Opus 5.5).