+6% FPS and half the 100 ms hitches: turn on VICTORY_STORE_BESIDE #4491
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4491"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by vilaris on 2026-11-30T21:11:35Z.
TL;DR — turn on
VICTORY_STORE_BESIDE=1The feature already exists on
mainand is off by default. This PR does not change behaviour: it records the measurements incrates/victory-gpu/src/titlewrite.rsand explains why it is still opt-in. Whoever merges decides whether to flip the default — see "Before making it default" below.With it, a title store that faults on a guarded block is done beside the guard (through the runtime's own view of the same pages) and the thread goes on, instead of opening the block and making it read-only again afterwards.
titlewrite.rsalready measures a protection change at ~5 µs, serialized process-wide, with ~590 write faults a frame in the world.Measurements
RTX 4070, Series S profile, DLSS Quality 1080→1440, frame generation off, release build, same scene, gameplay window only. "Presents/s" is the title's own frame rate (the
frame_timesline).VICTORY_STORE_BESIDE=1Also measured, for context (not changed by this PR):
VICTORY_REFRESH_WHY=1costs 4–7 ms a frame in refreshes (13.8 presents/s, 1.37 long frames/s with it on). Keep it off when playing or measuring.Caveats
VICTORY_COPY_SHAPEtoggled between runs (diagnostics only).SITES), so the fallback path is unchanged.Before making it default
With
VICTORY_STORE_BESIDEforced on,cargo test --locked -p victory-gpu --libon currentmaingoes from 2 failures (list::thin::tests::bindings_record_no_work,shader_cache::tests::every_switch_of_the_translator_is_in_the_key, both already failing onmain) to 11. The nine new ones:watch::many_askers_tests::no_write_is_lost_when_faults_take_no_lockwatch::many_askers_tests::no_write_through_another_view_is_lost_between_askerswatch::many_askers_tests::no_write_to_views_is_lost_between_askerswatch::many_askers_tests::no_write_to_resting_views_is_lost_between_askerswatch::many_askers_tests::no_mapping_is_lost_between_askerswatch::tests::faults_that_take_no_lock_tell_the_samewatch::tests::a_write_opens_the_view_it_goes_throughwatch::tests::what_the_title_puts_in_beside_a_guard_is_toldhost::refresh_tests::unchanged_ranges_are_knownSome may only expect the old behaviour (a fault opening the block); the
no_write_..._is_lostones check coherence. Each needs to be shown to be the former before the default flips. No corruption was noticed in play, but none was looked for.How to use it
VICTORY_STORE_BESIDE=1in the environment or in the F1 menu's settings file.🤖 Generated with Claude Code
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by m335671 on 2026-11-30T22:29:15Z.
A supporting data point from a third CPU family, in case it helps decide the default. These are observations from one machine (RTX 4070 12 GB / Ryzen 9 7900, 12 cores) and one scene, not a general conclusion. AI-assisted (Claude Code).
Release build of
829188e, Series X, 1440p output, frame generation off, the five switches of #2842 on in every run. Scene A of the protocol (the opening cutscene and the first room, unattended, 240 s, ~4,100-4,300 draws). Two rounds, the second in reverse order; averages of the 5 s lines with more than 500 draws (details in #756):STORE_BESIDE=1STORE_BESIDEwas the only single switch of the three we split (TABLE_SAME,RANGE_LOCK) that stayed outside the ±1.5 fps we see between identical runs, and the p10 went up with it. No stops and no visible difference in the captures in those runs. That agrees with burber's indoor result and dyshay's outdoor −1.1 to −1.7 ms in #2415.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by IRennie74 on 2026-11-30T22:38:55Z.
Context from a 6-core, where this may matter more than on a 4070 PC. On a Ryzen 5 5600X with an RTX 3060 (Series S, 960x540, DLSS Performance, standing in the opening) the write guards cost about 50 ms of CPU a frame: ~330 write faults a frame on the title's threads (22 ms), 10-13 ms waiting for the guards' lock and ~19 ms changing protections, on a CPU doing about 460 ms of work per 52 ms frame across 12 threads. The submitting thread is the wall there (busy 44-54 ms of 55-58) and the title's threads share its cores, so fewer protection changes could help indirectly even though
STORE_BESIDEleaves the submitting thread's own work as it was.On the nine failing tests: "no corruption was noticed in play, but none was looked for" is something #4376's
VICTORY_FLICKER_DETECT=1andsmoothness:line can measure. They count A-B-A flicker events a minute at every present (about 59 a minute walking on our combined build), and a lost write would most likely show as a rise there. We can runSTORE_BESIDE=1against unset on the 3060 with it and post the numbers if that helps.The title says "turn on", but the diff only adds the doc paragraph; saying so in the title would stop anyone merging it expecting the default to change.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by shurhundo on 2026-12-01T02:48:44Z.
Title and the "+6% FPS" headline read as if this flips
VICTORY_STORE_BESIDE's default, but the diff is doc-comment-only (titlewrite.rs) — the switch read itself is unchanged and the body says merging the default change is left to whoever merges. Worth retitling (e.g. "record VICTORY_STORE_BESIDE measurements") so it doesn't get merged on the assumption the default already flipped.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:39:58Z.
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed