d3d12_xs: the queue's slot 32 is PresentX, wired to the presentation core with a shared token source (RT-PRESENTX) #414
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!414
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/414/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:51 UTC · original
Mumogg:presentx-queue-slot32→main· +2257 −123 · 23 files · 27 commits · merged 2026-11-25 03:46 UTCClaimed in #14 as
RT-PRESENTX. Depends on: the stack up to #403 (their commits come first here; this pull request is the last two commits).What and why
After #403 the retail title reaches its first present: command-queue slot 32,
PresentX(plane count, planes, parameters). It is past the PC queue's 19 slots, somainrefuses it and nothing can be shown, althoughmainalready has the call's implementation (XboxPresentation,xbox_present.h).Two commits:
XboxPresentation::PresentX. The first call on a device builds a window and the Vulkan layer's presenter for it, once, and the state dies with the device proxy. A device that cannot present answersS_OKand shows nothing, so the frame loop runs either way; the mock and COM builds of the file have no presenter and answerS_OK. It follows old PR 2490's wiring (Nolan Cotter,2be25cee2), written again formain's queue proxy, where that commit does not apply.afb14d56cby Logan (-x, authorship kept; an ancestor ofmainwhose content is not in the tree): device slot 80 (WaitFrameEventX) and the presentation's pacer share oneFrameTokenSource. Without it the title waits through the device, gets tokens from the device's own counter and presents them to a pacer that never issued them. Adapted tomain: the uncapped pacer path issues from the shared source too, and the queue's PresentX hands the device's source to itsXboxPresentation.Left out on purpose:
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).--runXboxID3D12CommandQueue::Slot32 unsupportedPresentX ready (window ...), thenXboxPresentation::PresentX failedXboxPresentation::PresentX okThe last row is the first successful present on this path. Two honest limits on it:
int3of the title on a worker thread came first; that stop is there in every run now and is a race with the present, not caused by it. I have not looked at it yet.I have not looked at what is on screen. At this point of the boot the integration branch (#321) shows a black frame.
Tests under Wine:
xs_proxy_mock_testpasses;frame_pacer_testexits 0;xbox_present_test: all cases pass (both have the cases that came withafb14d56c).Not built with MSVC and not run on Windows.
device_proxy_testgets a case fromafb14d56cthat I cannot run here.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_01HxBQf4pXH8PWpC5oZsM4btlatencyframes in flight while armed (mailbox replace) #671@Mumogg on GitHub · 2026-11-24 05:04 UTC · original
A correction to my own pull request: the PresentX wiring broke
queue_proxy_test, which I had not run on it. Its 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 now, so nothing called it and the gate failed withqueue slot 32 never called.Fixed with one more commit on this branch: the test calls slot 32 where it calls the console
ExecuteCommandListsslot (that build of the proxy has no presenter, so the answer isS_OK).queue_proxy_testpasses under Wine again on the Vulkan backend. #416 is rebased onto it.AI-assisted.
@sodove on GitHub · 2026-11-24 06:02 UTC · original
checked: independent native Windows verification of the exact #414 head
11d44eee9f. Windows 11 x64 build 26100, MSVC 19.44.35220, SDK 10.0.26100, Release, RTX 5070 Ti / NVIDIA 610.74, Vulkan loader 1.4.341.e7044cb9bimmediately before the PresentX changes. The HDR10 swapchain subcase skipped on this display.Synthetic fixtures only. AI-assisted verification.
@towade on GitHub · 2026-11-24 15:25 UTC · original
@Mumogg, a retail data point and two integration notes for this PR on current
main(d0da7dade, which now has #402). RX 9070 XT, own 1.0.2.1 copy, with #511 and the other open boot pull requests below it (ladder on #14). Counts only.mainhas #402's routing, but nothing callsattach_xbox_presentationoutside the tests. With8ba15dd44and77c801c82on top,PresentX readyis logged, and the title's 8PresentXcalls reachXboxPresentation::PresentX.af8c42bb1. The title passes tokens from the device-sideWaitFrameEventX, which the presentation's pacer never issued, socheck_present_tokenrefuses them.af8c42bb1does not apply tomain, because #402 rewroteframe_pacer.h(per-event ticks,issue_token_locked), so it needs adapting rather than a rebase. With a local-only change that lets such tokens through, allPresentXcalls returnokand noExecuteCommandListsfails.xs_proxy_mockandxs_proxy_mock_env_slotsfail (lines 2776 and 1582 of the combined tree). Both are #402's tests: they expectraw(queue, 32)to beE_NOTIMPLwhilePresentXis routed to slot 30 or an env slot. Here slot 32 is fixed. Going through #402's handler, with itsPresentXdefault at 32, might settle both.Not run: your branch as is (it conflicts with
mainind3d12_xs_device.cpp,.handframe_pacer.h), and anything past the next stop: the title's ownint3, which this PR doesn't change.AI-assisted (Claude Code).
@QemmHD on GitHub · 2026-11-25 01:01 UTC · original
@aslan2142 @Mumogg: #414 is the next rung after #403, and it needs more than a merge now that #402 is in. PresentX has to go through #402's handler at slot 32, a presenter has to be created, and the token source has to be shared. Mumogg has been away since ~10:24Z.
If it helps, I can carry the adaptation onto current main as a separate PR. I'd keep Mumogg's commits
8ba15dd44and77c801c82with their authorship, re-implement Logan's frame-pacer piece over #402's rewrittenframe_pacer.hwith aCo-authored-by, and update the two #402 tests that expect slot 32 to beE_NOTIMPL. It would be tested on Windows 11 / MSVC / RTX 4070 SUPER withxs_proxy_mock,queue_proxy,frame_pacerandxbox_present(no game files). It's about 200 lines.I'll only do it if you want it, since #984's merge may make it redundant. Just say so here.
AI-assisted (Claude Code, Claude Opus 5.5).
@aslan2142 on GitHub · 2026-11-25 01:28 UTC · original
@QemmHD thanks for the offer, and for keeping an eye on the ladder. Please don't start it: we'll settle #414 after #984 and #939 are in, because between them they cover most of it.
mainis tested and goes in shortly. It brings the presenter that is created on the firstPresentX, theFrameTokenSourceshared between device slot 80 and the pacer, andPresentXrouted through #402'sXboxQueueSlotRoutes. That's what towade found missing.PresentXis queue slot 30, or 32 once a queue is detected as the newer layout (#984's measured rule), andLEONIDA_XS_PRESENT_X_SLOTpins it. The two #402 tests that expectedE_NOTIMPLat 32 are adapted there.attach_xbox_presentationdoes, makes the nextWaitFrameEventXfail, because that pacer never saw the title'sSetFrameIntervalX. The merge keeps them on the device.mainand either merge the remainder, keeping Mumogg's commits and Logan's credit, or close it as carried. If something is left that you'd like to take, it'll be much smaller by then; I'll say here.AI-assisted (Claude Code, Claude Opus 5.5).
@QemmHD on GitHub · 2026-11-25 01:37 UTC · original
@aslan2142 understood, I won't start it, and thanks for the detail on the two defects. Since you can't build with MSVC here: the merged #984 head (
71a783e56) is building now on native Windows 11 with MSVC (VS 2022) and an RTX 4070 SUPER. I'll post the build result, full ctest and the validation run on #984 as soon as they're in.AI-assisted (Claude Code, Claude Opus 5.5).
@aslan2142 on GitHub · 2026-11-25 03:47 UTC · original
Marked merged through #430, whose branch contains this one. The content was already in
mainsince #984 and #939, in this form:XboxQueueSlotRoutestoqueue_present_x, which builds the presenter on the first call.LEONIDA_XS_PRESENT_X_SLOTpins it.FrameTokenSource.queue_proxy_testchange isn't needed: slot 32 is not an overridden slot onmain, and the console-tail sweep calls it.As promised in the thread, this was settled after #939. Thanks to Mumogg and Logan, and to QemmHD and towade for the analysis.
AI-assisted (Claude Code, Claude Opus 5.5).