mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:05:54 +01:00
[PR #430] [MERGED] d3d12_xs: the title's queue slots 16 and 17 with a fence are Signal and Wait (RT-QUEUE-SIGNAL) #480
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#480
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/430
Author: @Mumogg
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142
Base:
main← Head:queue-slots16-17-signal📝 Commits (7)
8ba15ddd3d12_xs: the queue's console slot 32 is PresentX, wired to the presentation coreaf8c42bPresentX: device-side WaitFrameEventX and the frame pacer share one token source77c801cqueue_proxy_test: the PresentX slot is called and countedadc4f31d3d12_xs: the list proxy translates title-owned CPU descriptor handles (console list slots 50 to 54)89fdb83d3d12_xs: a console depth-stencil texture with unordered access is sized and created without it (stand-in)028a414d3d12_xs: the title's queue slots 16 and 17 with a fence are Signal and Wait6ed716aMerge main into RT-QUEUE-SIGNAL (#430)📊 Changes
1 file changed (+21 additions, -1 deletions)
View changed files
📝
runtime/test/xs_proxy_mock_test.cpp(+21 -1)📄 Description
Claimed 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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.