mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:25:53 +01:00
[PR #2116] d3d12_xs: a stall snapshot of what list writes, gates and held work w… #2123
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#2123
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/2116
Author: @tiguan26
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:rt-list-values-stall-snapshot📝 Commits (3)
bdb84f6d3d12_xs: a stall snapshot of what list writes, gates and held work wait for (RT-LIST-VALUES-STALL-SNAPSHOT)1b7a4e9Merge remote-tracking branch 'upstream/main' into rt-list-values-stall-snapshot2b06d7ad3d12_xs: the 10 s list-value line says what recorded and submitted count📊 Changes
10 files changed (+541 additions, -11 deletions)
View changed files
📝
docs/d3d12_xs_console_abi.md(+9 -0)📝
runtime/CMakeLists.txt(+8 -0)📝
runtime/shims/d3d12_xs_device.cpp(+5 -1)📝
runtime/shims/d3d12_xs_device.h(+5 -1)📝
runtime/shims/d3d12_xs_list_values.h(+138 -6)➕
runtime/src/held_work_report.h(+53 -0)📝
runtime/src/queue_holds.h(+57 -0)📝
runtime/src/vulkan_backend.h(+108 -2)➕
runtime/test/queue_holds_report_test.cpp(+122 -0)📝
runtime/test/xs_proxy_mock_test.cpp(+36 -1)📄 Description
Claim: RT-LIST-VALUES-STALL-SNAPSHOT (#1608). AI-assisted (Claude).
What and why
The boot now stalls after the story load. @OreoFR (#1723, Windows, RTX 4070 Laptop) and @Snooozs (#1608, Windows 10, RTX 5060 Ti, six runs) both report the list-value counters freezing for minutes with a fixed number of writes "recorded" but not landed (107 and 113), nothing submitted, the pump and releaser idle, and the title polling fence mirrors that never move. Today's log can't say what the stall is waiting for. This adds a one-time snapshot that says, and changes nothing else.
Stall snapshot (
d3d12_xs_list_values.h). When the 10 s summary has not changed three times in a row while recorded writes have not all landed, the pump logs once, and again only after the counters move:writtenfence value it needs, and how far the fence got;A wait with no Signal of that value submitted names the fence the stall is stuck on.
writes_submittedcounter.writes_recordedis counted once per recording (record_value_op), so "recorded minus landed" also counts writes in lists the title recorded and never executed. The new counter is bumped when a list's writes go to the queue, and is printed in the summary line (N writes recorded, N submitted, N landed). If submitted equals landed in a stalled run, the 113 are unexecuted lists and not writes in flight.Pump wake. With nothing in flight the pump waited
INFINITE, so a title that stopped submitting got no summary at all. It now looks every 10 s.Plumbing.
src/held_work_report.his a small registry. EachQueueHoldsregisters itself, andVulkanContextadds its CPU-wait lines throughQueueHolds::set_describe_extra.Holder::describe_heldis virtual with an empty default, so other holders are unaffected. Locks are only tried (1 s for a running release, 0.5 s per queue's state lock) and the report says so when one doesn't come free: a report must not hang on the thing that is stuck.held_atis now set on every held operation (it was only set underLEONIDA_GPU_LATENCY).Documented in
docs/d3d12_xs_console_abi.md§5.5.Tested
No GPU work and no game files. Built on Linux as the Windows runtime (clang-cl 19, lld-link, xwin SDK 10.0.26100, full build including
gta6rt) and run under Wine 11.22 with llvmpipe:xs_proxy_mock_test: PASS. New step 9: a write group whose queue has not reached itswrittenvalue and a closed 64-bit gate; the snapshot nameswritten fence 6, completed 5 (the queue has not run that far)and the gate's address, comparison, reference and memory. Step 1 also checkswrites_submitted.queue_holds_report_test: held operations named with fence, value and highest Signal submitted; extra lines first and removable; two instances; nothing reported after destruction. Passes under Wine, and natively with clang 19 under ThreadSanitizer and AddressSanitizer/UBSan.ctest -R "fence|queue|xs_proxy|present|holds|replay_texture|list_value": 47/47 passed, includingd3d12_fence_timing(held CPU signals) andvk_presenter_sync. Two skipped, as on main (they need a second queue family).scripts/check_no_game_data.pyon the changed files: clean.@Snooozs offered to run this in the stalled state. The snapshot comes out on its own about 30 s after the counters stop.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.