d3d12_xs: the title's queue slots 16 and 17 with a fence are Signal and Wait (RT-QUEUE-SIGNAL) #430
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!430
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/430/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 05:05 UTC · original
Mumogg:queue-slots16-17-signal→main· +21 −1 · 1 files · 7 commits · merged 2026-11-25 03:46 UTCClaimed in #14 as
RT-QUEUE-SIGNAL. Depends on: the stack up to #427 (their commits come first here; this pull request is the last commit). The change is in the queue proxy and its test, next to #403's.What and why
The same kind of bug as #403, one slot over.
Queue slots 16 and 17 are
GetTimestampFrequency(UINT64*)andGetClockCalibration(UINT64*, UINT64*)on the PC; both write through their first argument. The retail title calls queue slot 16 with one of its fences and a value: the shape ofSignal(fence, value). On the console queueSignalandWaitsit two later than on the PC, at 16 and 17, as the frequency getter does at 18.mainforwarded the call by number, so the PC frequency getter wrote the frequency over the first 8 bytes of the fence proxy: its vtable pointer. The title's next call on that fence then went through a null pointer.How I found it: at the fault the register that should hold the fence's vtable held 1,000,000,000, the frequency the layer answers; and the object the title was calling was a queue/fence/allocator proxy at an address I had logged.
The change: the title's call (
set_console_caller) whose first argument is a fence proxy goes to the PCSignalorWaitwith the real fence. A host caller keeps the PC getters, and so does a title call whose first argument is no object of this proxy, which cannot be aSignal.Written by me. The slot order is the console queue's of old PR 2490 (Nolan Cotter), which detects the layout at run time; this is one rule for
main's queue proxy.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, #219, #328, #387 and #428 applied on top for the boot runs (they are not in this branch).--runXboxID3D12Fence::Slot12 unsupported, then the title writes through a null pointerBoth runs create 50,450 pipeline states. The next stop is fence slot 12, a console method one past
ID3D12Fence1that returns a pointer the title reads; refused, the title dereferences the error code.5ac4deaa2(TreXito) is the piece for it and I will try it next.Tests under Wine:
xs_proxy_mock_testpasses with the new case (both slots with a fence reach the mock queue's slots 14 and 15 with the real fence; the fence proxy's first word is unchanged; the non-fence call and the host call reach slot 16).queue_proxy_testpasses on the Vulkan backend.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
The coverage gate asks for every queue slot to have been called, and skips the overridden ones in its sweep of the refused tail. Slot 32 is overridden since the PresentX wiring, so nothing called it and the gate failed ("queue slot 32 never called"). The test now calls it where it calls the console ExecuteCommandLists slot: this build of the proxy has no presenter, so the answer is S_OK. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt@Dezmonius on GitHub · 2026-11-24 13:51 UTC · original
Independent native Windows check of RT-QUEUE-SIGNAL. Windows 10 22H2 (19045), MSVC 19.51.36256, Windows SDK 10.0.26100, Ninja Release, RTX 5070 / NVIDIA 610.88.
xs_proxy_mock_testsource: parent89fdb83e0fails the new slot-16 routing assertion, while PR head028a414fapasses, including the slot-17 routing, unchanged fence vtable and host getter controls.queue_proxy_testpassed on all three backends: native D3D12/WARP, native D3D12/RTX 5070, and Vulkan/RTX 5070 with Khronos validation 1.4.369 enabled.queue_proxy_testcalled Xbox slots 16/17 on the real queue proxy. Slot 16 completed a signal, slot 17 held a subsequent queue signal until a CPU signal released the wait, and the fence vtable stayed unchanged. This passed on all three backends. The real-device extension was run on the PR head only.Synthetic data only; no game files or retail boot. AI-assisted (Codex).
@aslan2142 on GitHub · 2026-11-25 03:46 UTC · original
Merged, after merging
maininto it (6ed716a99). Thanks. Only the test is left of this;maintook the routing from #984/#939 in its own form:RT-QUEUE-SIGNAL, valid, before this PR.main: queue slots 16/17 with a fence go to Signal/Wait throughmain's layout detection (any caller), which also marks the newer queue layout and so moves the PresentX slot.main's rule: with a fence, slot 16 reaches PC Signal and slot 17 reaches PC Wait, both with the real fence, the PC getters are never called and the fence proxy's vtable pointer is unchanged. Slot 17 had no test onmain. The host-caller and no-fence expectations are dropped, becausemainanswers those callsS_OKonce the layout is detected.xs_proxy_mockpasses on both and fails when slot 17 is sent to Signal; the full suite shows no test going from pass to fail.mainalready (notes on each). #432, #428 and #602 are carried as well.mainbfef489cb+6ed716a99: it merges cleanly; the semantic suite passes (487 files, 6,279 tests, 0 files failed); the 14 docs and writer tests pass;check_no_game_data.pyis clean on the 1 changed files.AI-assisted (Claude Code, Claude Opus 5.5).