d3d12_xs: the title's queue slot 18 is the frequency getter, not PC GetDesc (RT-QUEUE18) #403
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!403
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/403/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:44 UTC · original
Mumogg:queue-slot18-frequency→main· +266 −33 · 6 files · 9 commits · merged 2026-11-25 00:13 UTCClaimed in #14 as
RT-QUEUE18. Depends on: the stack up to #396 (their commits come first here; this pull request is the last commit). The change itself is in the queue proxy and its test.What and why
This is the cause of the fault I could not explain in #391, #395 and #396.
Command-queue slot 18 is
ID3D12CommandQueue::GetDescon the PC: a struct return that writes a 16-byteD3D12_COMMAND_QUEUE_DESCthrough its hidden pointer. The retail title calls queue slot 18 with one pointer to 8 bytes. That is the shape ofGetTimestampFrequency(UINT64*), which the console queue has at that slot: two methods are inserted at 14 and 15, so the PC slots 16 to 18 sit two later.mainforwarded the call asGetDesc, which wrote a description over the title's 8 bytes and the 8 after them.How I found it: the normalized D3D12 traces of this path and of the integration branch (#321) were the same up to that point except for one extra line here,
ID3D12CommandQueue::GetDesc calledright afterXboxID3D12CommandQueue::GetDesc called.The change: the title's call goes to the PC slot 16. "The title's call" is decided by the caller classifier device slots 61 and 74 use (
set_console_caller), so a host caller, and every caller when no classifier is installed, keeps the PCGetDesc.Written by me, not cherry-picked. The reading of slot 18 comes from the console queue work of old PR 2490 (Nolan Cotter), which answers an undetected slot 18 as the frequency getter because it is the only reading that cannot overrun its argument. That work detects the queue layout at run time and does not apply to
main's queue proxy; this is the one rule the boot needs. Slots 19 and 20 are left as they are: I have not seen the title call them.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 and #387 applied on top for the boot runs (they are not in this branch).--runExecuteCommandLists okint3on another thread, after command-queue slot 32 is refusedWhat the fault was hiding: after the first submission the title now records on its list (
Barrier,ClearRenderTargetView,Barrier), submits again, creates six samplers and five placed resources with their views, and calls queue slot 32, which isPresentX. That is the first present call on this path. It is refused as past the PC queue table, and oneID3D12GraphicsCommandList::Closefails along the way; those are the next two things to look at.That the overrun is what broke the title is an inference from the forwarded call's shape; what is measured is that the fault is gone with this change and nothing else.
Tests under Wine:
xs_proxy_mock_testpasses with the new case (the guest call reaches the mock queue's slot 16 with its pointer and leaves the words around it alone; a host call, with a classifier and with none, reaches slot 18).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
@aslan2142 on GitHub · 2026-11-25 00:14 UTC · original
Merged. Mumogg is still away and this is the next rung on
main's boot path, so I brought the branch up to date as with the rungs before it: one merge commit on top of862890c89(fb2afdccc), mergingmainwith #391, #395 and #396 in it. Mumogg's commit is untouched and nothing was force-pushed. There were no conflicts.What it does: queue slot 18 is the frequency getter for the title's calls. A caller in a guest-mapped image goes to the PC slot 16 (
GetTimestampFrequency(UINT64*)); a host caller, and every caller when no classifier is installed, keeps the PCGetDesc. The check isis_console_caller, as for device slots 61 and 74. This stops the PCGetDescwriting 16 bytes over the title's 8-byte argument, which by Mumogg's reading is what broke the title after its first submission.How it is known: the mapping agrees with the console queue table Kokonotcu posted in #14 (#14): 16
Signal, 17Wait, 18 frequency, 19GetClockCalibration, 20GetDesc. What this PR measures itself is that the fault goes away; that the overrun was its cause is an inference, as the PR says.Holds and requests: none on this PR.
Tests (clang-cl with the xwin SDK; Wine, headless; llvmpipe and an RDNA2 iGPU):
mainwith #396: no test changed state on either device (259 pass and 15 fail on llvmpipe, 255 and 21 on the iGPU, on both sides).queue_proxy,xs_proxy_mockwith its six variants anddevice_proxypass on both devices.check_no_game_data.pyon the two changed files is clean. The Linux portable subset does not build these files.PresentX) is refused.For later:
GetClockCalibration) and 20 (GetDesc) of the same table, and refusing 14 and 15, which are unmeasured. Slots 16 and 17 are #430.docs/d3d12_vulkan.md.Next: #414 (
PresentX). It needs more than a merge:mainalready routesPresentX(default slot 30, moved withLEONIDA_XS_PRESENT_X_SLOT) and hasattach_xbox_presentation, which nothing calls yet, while #414 hard-codes slot 32 with a presentation path of its own. Whatmainlacks and #414 brings is the token source shared between device slot 80 and the pacer, and the code that creates the presenter.AI-assisted (Claude Code, Claude Fable 5.2 and Claude Opus 5.5).