Reset landed host lists on the helper thread #284
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/TaynanGT--Vice-Tay!284
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-284"
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?
@PetrSeifert on GitHub · 2026-11-27 13:37 UTC · original
PetrSeifert:perf/submit-thread-overhead→main· +139 −5 · 3 files · 1 commits · merged 2026-11-27 17:19 UTCSummary
Split from the original 3-commit #284 per review feedback so each submitting-thread change can be evaluated and attributed independently:
993dd7d): Offload landed host-list resets (land()) out ofsend_lateonto thevictory-late-waithelper thread, keeping an inline fallback only when the helper thread is not live.38c4cf9):perf/card-steps-preplan) — reusecut_or_plan'sPreplanincard_stepsperf/heap-sync-stamps) — share heap-sync rounds across queued submissions viaSyncRoundsDynamic-slot retirement safety & telemetry
Both
relay_landandsettlealready callDetached::release_tables()on every list in a flight before pushing those lists ontoline.landed, so offloadingland()does not delay dynamic descriptor slot return to recording threads.Under
diagnostics,late_linenow reports submitting-thread vs helper-threadland()time alongside dynamic slots waiting for retirement (in flight,peak retired at settle, andin landed+line.landedqueue depth). A unit test (pending_dynamic_slots_clears_after_tables_done) verifiesState::pending_dynamic_slots()drops to0aftertables_done().Verification
Automated checks
cargo xtask policy --staged— passedgit diff --check— cleancargo clippy --locked -p victory-gpu --all-targets -- -D warnings(default and--features diagnostics) — passedcargo test --locked -p victory-gpu --lib -- --test-threads=1(default and--features diagnostics) — passed (single-threaded due to the pre-existing parallel flake inhost::refresh_tests::raw_title_copy_keeps_write_watch_and_resends_equal_byteson unmodifiedmain)Real-title comparison (GTA VI, Series S, standard
-Machine 4070diagbuild)target\diag\victory.exeshared path so all runs share the same NVIDIA shader cache). Diner comparisons use the exact contiguousbeing_made = 0diner window (11 five-second samples, excluding initial scene-load spike and final transition), plus whole-diner submit time for transparency.origin/main(38c4cf9, SHA-256F3DF678E...,base38-r3,being_made = 0from+8s; plus settled cell tail frombase38-r2)993dd7d(SHA-2567EDE6483...,landing-r2,being_made = 0from+8s)scripts/play.ps1 -Console series-s -Machine 4070 -Build diagsettings +VICTORY_PIPELINE_WORKERS=8,VICTORY_FULLSCREEN=1,VICTORY_PANEL=1being_made = 0, single run each)base38-r3(38c4cf9)landing-r2(993dd7d)n=115s samples)n=511s samples)Slot-retirement &
land()telemetry (landing-r2, steady Prologue cell):land()time:0.00 ms/frameon submitting thread,16.30 ms/frameonvictory-late-waithelper thread7,895in flight (peak20,176retired atsettle),0inline.landed(peak0across all 126 log lines),64.3landed flights queued (peak70),0dynamic-slot waits or refusals (copystat).18.93vs18.80early; settledbase38-r2tail is19.80 FPS), while the submitting thread saves~2.3–2.4 ms/frameduring the heavier diner cutscene without delaying dynamic-slot return.Full-video visual review
base38-r3(140.8s) andlanding-r2(141.9s) via start-to-finish contact sheets and full-resolution diner/cell frames: 0 errors, 0 DRED, clean diner waitress and Prologue cell visuals throughout.origin/main(38c4cf9) also showed the exact same intermittent coloured skin mosaic on the diner waitress in bothbase38-r2andbase38-r3on this RTX 4070;landing-r2rendered cleanly.@TaynanGT on GitHub · 2026-11-27 13:43 UTC · original
@PetrSeifert Please split the three changes so the submit-thread gains can be attributed. Moving landing affects when descriptor slots are returned, so record slots waiting for retirement alongside the thread time. The repeated heap sync and card-step plan can each use the same-route control.
@Garu667 on GitHub · 2026-11-27 15:20 UTC · original
Tested on an RTX 3080 10 GB (Series S,
-Machine auto, boat mission autosave, warm shader cache), one run each:maine45051amain+ #284mainand never saw it before this run. One launch only, so it could still be a one-off. I can rerun #284 andmainagain to check whether it reproduces.@TaynanGT on GitHub · 2026-11-27 15:32 UTC · original
@Garu667 The FPS difference is within the run-to-run spread, and preparation rose from 81 to 83 ms. The mosaic is the part I’d check first. A second control/candidate pair at the desk, with the same save and camera, can tell us whether to isolate the three commits.
Take landing, repeated heap-sync rounds and a second card-step plan off the submitting threadto Reset landed host lists on the helper threadd7334aa200to993dd7dd03@PetrSeifert on GitHub · 2026-11-27 16:39 UTC · original
@TaynanGT Split into three single-change PRs on
38c4cf9(this PR now keeps only the helper-threadland()offload, with card-step preplanning in #322 and stamped heap sync in #323), added dynamic-slot retirement telemetry (0 slots stuck inline.landed), and updated the body with isolated warm-cache comparisons and full-video verification. Ready for review!@PetrSeifert on GitHub · 2026-11-27 16:52 UTC · original
@Garu667 @TaynanGT Quick note on the coloured face/neck mosaic: we also hit the exact same mosaic on the diner waitress on unmodified
main(38c4cf9) in bothbase38-r2andbase38-r3on an RTX 4070, while all four split PR runs (#284, #322, #323 with the two post-write/GPU-landing heap-sync floor fixes, and #285) rendered cleanly. I don't have a desk autosave to re-test that exact camera, so let me know if you'd like to re-check #323 on the boat-mission save.@TaynanGT on GitHub · 2026-11-27 16:58 UTC · original
@PetrSeifert Zero dynamic slots left in
line.landedanswers the retirement question. The mosaic in both unmodified diner runs also gives us a control for the image issue. Yes, a boat-mission pair with #323 and the same save and camera would help check the two heap-sync floor fixes before putting the splits together.@urielbeaupre on GitHub · 2026-11-27 17:06 UTC · original
Measured on Windows 11, RTX 4070 Ti 12 GB, Ryzen 9 7900X, 64 GB, driver 621.40. Setup:
scripts/play.ps1 -Machine 4070 -Console series-s -Windowed, ray tracing off.The base is
8137f71, from #305 (on top ofmainatb06fdd5). #284 and #294 were merged together onto it, so the result below is the two combined. I haven't separated them.Method: unattended opening (the game's own intro sequence, A pressed by
VICTORY_KEYS_FILE); a warm-up run first so no pipelines were being made (checked in the log); then 100 s of the frame lines.That's about +20% at the median, with the slow quarter gaining the most. There was no crash, and the picture looked unchanged. I can split the two PRs into separate runs if that helps.
@TaynanGT on GitHub · 2026-11-27 17:08 UTC · original
@urielbeaupre Yes, please split the runs. For #284, use
8137f71with ray tracing off and the same 100-second window. Include the slowest quarter, time inland(), and queued lists if the log has them. That’ll show how much of the combined 20.0 FPS result comes from moving the reset to the helper.