Reference, not for merging: what took a busy scene on an RTX 5080 from ~34 ms to a steady 25-26 ms #4836
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!4836
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4835"
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?
@mstrmoos on GitHub · 2026-12-01 10:44 UTC · original
mstrmoos:pr/25ms-reference→main· +4277 −978 · 58 files · 47 commits · closed without mergingWhat it changes
This is a draft for reference, not for merging as it is. It's the branch I play on. It got an RTX 5080 from about 34 ms a frame (median) to a steady 25-26 ms in a busy scene, with frames evenly paced. Most of that comes from settings anyone can use on
maintoday. The rest is code that's spread across several open PRs, plus some that isn't anywhere else. I'm opening it so the whole recipe and the measurements are in one place. Anything useful can be taken from it, and I'll split pieces into their own PRs where that's wanted.Branch:
mstrmoos:pr/25ms-reference, onmain0c8c2092, so it will show conflicts against today'smain.The result
Same PC, same scene, same switches and title settings (listed below), 120 s each, back to back:
main5fabb46eBoth runs are limited by the card (busy 96-98 %).
mainis the settings and the title's own LOD and population.The recipe
What each part does and what it was measured at. Most rows were measured on their own on the pier scene, at different points of the work, so they don't add up exactly:
VICTORY_DLSS=1, Balancednvidia-sdkthe launcher silently leaves it off.VICTORY_SCRATCH_CARD=1(#4333)maine1251c31, card-bound: 43.0 → 37.0 ms.VICTORY_SUBMIT_SPLIT,LAZY_COMPARE_MB=64,LAZY_NARROW,TABLE_SAME(#3809's switches)VICTORY_WAVE_CHEAP=1f1fbd86759b3da2VICTORY_SAMPLED_MARKS=0VICTORY_AMBIENT_SPECULAR=0(nowmain's default)lod=a15e200)VICTORY_IMAGE_HOLDfrom #1155. The value in the title's settings presets does nothing.ped=6d31b58,veh=a4a7d40,park=a4a7d3c)VICTORY_PRESENT_ASIDE=1 VICTORY_PACE=auto(#2201, #4701)VICTORY_PACEdid nothing withoutPRESENT_ASIDE, which #4701 fixes.Outside the layer, Windows' memory integrity (VBS/HVCI) was turned off for these runs. That took 1-2 ms, by cutting stalls in the guards'
VirtualProtectcalls. A first reading of 4-5 ms was a single outlier run.What's in the branch's code
95ccd6deVICTORY_SCRATCH_CARD)31291698,dbbc78c9movntps/movntpd); the block limit isVICTORY_BESIDE_MOST8892d6fbVICTORY_COPY_OPEN_UNLOCKED, port of 99c12028)e62838654ba45d36VICTORY_PROCESS_MEMORY=1. ItsVirtualQuerywalk over about 80k regions holds the address-space lock, and the title's threads stall 10-14 ms inVirtualProtectevery 5 s.d5e4d68dsend_copiedholds only the card copies that hold the bytes (VICTORY_CARD_NEAR, from Biskwit/VIctory-reloaded)d0badcc02247b5deVICTORY_WAVE_CHEAP=<hashes>for named wave64 programsfa97d1ecVICTORY_REFLEX_BOOST=1)f5094bab,fdce4a7bVICTORY_PACEsays when it can't ask the display and asks again. Where the display's refresh wait returns at once (seen with the monitor asleep), it keeps time by the mode's refresh rate. Before, it ran unpaced and logged nothing: a 300 s run gave 28.5 ms and p95 39.6 instead of 25-26 and 28.427c778amain's lane rules, about 3x15acf185(half_meet_athalf only),6bd06ceee8a17f42…b42a6eb5,10d10bbd,ecfd5a3a,305adc66VICTORY_PROFILE), upload rings (VICTORY_RINGS), GPU time per shader (VICTORY_GPU_TIME,_TOP,_NEXT)a70fb4db,490cdbc9VICTORY_PROTECT_ONE(slower, 42.0 against 40.0 ms); ring telling v2 (VICTORY_RING_TOLD, rings 0-2, correct but slower: submitting thread 26.0/27.1 against 19.1/22.1 ms)Tried and ruled out (in case it saves someone the time)
VICTORY_NARROW_BARRIERS=1is slower on NVIDIA: card 26.6-28.0 → 28.4-30.2 ms.GUARD_HOT=150(leaving blocks open) is much worse: 51.7 ms.VICTORY_HEAP_HOOKS=1cut protections from 12.0 to 4.8 ms, but the frame went 32.9 → 34.1 (#3650).ASK_FIRST,COPY_BESIDE, and refreshing big copies outside the scoped pass were all null on the submitting thread's working time.VICTORY_REFRESH_CHECK. Rings 0-2 are clean, but slower.How it was tested
VICTORY_KEYS_FILE.main5fabb46ewith the recipe above: 27.7 ms median, p95 34.7, p99 37.9, 12 frames over 50 ms, 84 of 120 seconds with p95 over 33 ms.cargo testpassed for the crates it touches: yes forvictory-formats(18 BCPack tests, including two new vector/scalar equivalence tests).victory-gpu --lib: 1,149 passed and 2 failed,list::thin::tests::bindings_record_no_workandshader_cache::tests::every_switch_of_the_translator_is_in_the_key. Both come with this branch's base (0c8c2092, whosevictory-gputests don't compile without #4025). Both pass onmain5fabb46e, fixed there by343bf99f, and no commit here touches either. Invictory-shader,split_lds_wave32_read_after_read_barrier_coalescing_and_parityfails onmainalready.Checked for overlap
With the pace's warning in place, a 90 s pier run said why it went unpaced: IDXGIOutput::WaitForVBlank returned at once, so no refresh period could be measured ('no two refreshes were more than 0.5 ms apart'). The same display paced normally overnight; the wait behaves like this with the monitor asleep or the desktop watched through a streaming app. Now the period comes from the display mode's refresh rate (EnumDisplaySettingsW) and the pace sleeps, then spins, to the due refresh; the present, which can't tear, still lands on a refresh. The pace line says by_clock=true when it does.@trustno1-coder on GitHub · 2026-12-01 18:31 UTC · original
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