fix(dlss): the DLSS model row's preset is taken once it holds it, not a feature for each one stepped past #39
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
needs measurements
question
testing wanted
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!39
Loading…
Reference in a new issue
No description provided.
Delete branch "llun/Longshot:fix/dlss-preset-settle"
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?
Why
Picking the DLSS model L in the menu also made a DLSS feature for M on the way there (the row goes K, M, L, NVIDIA's default). NVIDIA's runtime keeps a released feature's video memory for some seconds, so at 3440x1440 DLAA three models were held at once: VRAM jumped about 1.2 GB for a few seconds. On the reporter's 12 GB card that is the moment it nearly ran out.
What changed
dlss_checks::PresetSettle(gpu/vk/dlss_checks.h): the DLSS model row's preset is taken once the row has held it for 30 frames (half a second at 60 fps). Until then the feature already made keeps drawing with its own preset. The first feature, or one made again after being let go, takes the row's preset at once.vk_dlss.cppprepare()reads the preset through it.RX_VK_DLSS_PRESETis unaffected, since it never changes in a run.tests/test_dlss_checks.cppsteps K to M to L 11 frames apart, as in the report, then away and back, with no feature, and NVIDIA's default.tests/test_dlss_checks.pychecks thatpreparereads the preset only through the settle. The Python check fails onmainand passes here.docs/tested-configurations.mdfor the runs below.The rest of #17, fewer fps with L or M at DLAA, is not this: it is the models' own cost, measured below on both builds. The preset, sizes and creation flags reaching NGX are right. L's extra GPU time grows with DLSS's input size: in the reporter's RTX 5070 log, +0.4 ms at Ultra Performance (1147x480) and +4.4 ms at DLAA (3440x1440). See also NotRexed/Hookshot#2836.
Flags and settings
None: no new switch, ini key or menu row. The DLSS model row (
dlss_model) keeps its values; only when its new preset takes effect changes.Measurements
main:
d4a69456(2026-11-12), rendererthis PR: fix/dlss-preset-settle @
e8c02084, renderer (rebased since onto maind725b363as 6f545914/ac7ff634: main's change between is forge tooling and docs only, #48, so the renderer measured is the same code and the numbers hold)Baseline: main @
d4a69456Hardware: RTX 5080 16 GB, Windows 11
Scene: Kokiri Forest (child, the debug teleport's arrival), standing; output 3440x1440, Upscaler NVIDIA DLSS, Render resolution Native (DLAA), frame rate cap 240, frame generation off
Method: one game build (main
82de567a) with itslongshot_vk.dllswapped. Both renderers were built alone (RX_VK_ONLY) the same way. 4 runs, before/after/after/before, headless, through the control bridge. Each run measured steady K (1500 frames), then set the DLSS model row M and 11 frames later L, as the menu does when stepped (steady L), then M and K (steady K), then M alone (steady M). GPU time and fps fromlongshot_log.txt'sGPU timeandpresentslines (median over each steady phase); DLSS's own memory from the status lines (NGX_DLSS_GET_STATS); VRAM and power fromnvidia-smievery 100 ms, the peak in the 15 s after a switch against the 3 s before it.d4a69456(2 runs)e8c02084(2 runs)The steady numbers are the same on both builds. The second before run ran a lighter scene throughout (K 6.8, L 9.6 ms), so the ranges leave it out. L costs about 3 ms more GPU than K at 3440x1440 DLAA on this card and drops fps by about 20% at about 40% more power: what the reporter saw on an RTX 5070, and the same before and after.
Not tested
Linux, AMD and Intel are not affected (DLSS only), and
dlss_checks.his plain C++. Not run on a 12 GB card, where the peak mattered most, or with a controller stepping the row in the menu by hand (the control bridge sets the row the same way,option set dlss_model).python -I -B tests/run_all.pyon Windows 11 (llvm-mingw): 452 passed, 4 failed, 75 skipped (on the rebase onto maind725b363). The four fail the same way onmainon this PC, for its setup:test_bake_portability(nozstandard),test_lift_cache(nonumpy),test_fpx_stickyandtest_spawn_emit(<algorithm>not found compiling a64emit). Forgejo runs no CI, so this was run locally.Screenshots
Nothing on screen.
Risk and rollback
A preset picked in the menu now takes effect half a second (30 frames) later; until then the feature already made keeps drawing with its old preset. If the row is stepped and left within those frames, no extra feature is made, which is the point. Nothing else in DLSS changes, and FSR, XeSS and the native path are untouched. Reverting the fix commit is enough.
Issues
See #17
Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above).third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
Assisted-by:/Co-Authored-By:trailers.docs/tested-configurations.mdfor each measured run.mainand passing here.tests/that reads changed source updated in this PR, not weakened.🤖 Generated with Claude Code
WIP: fix(dlss): the DLSS model row's preset is taken once it holds it, not a feature for each one stepped pastto fix(dlss): the DLSS model row's preset is taken once it holds it, not a feature for each one stepped pastRebased onto main
d725b363(#48, forge tooling and docs only); headac7ff634. Full suite run again on Windows 11 (llvm-mingw): 452 passed, 4 failed, 75 skipped, the same four that fail on main here. The description now follows #48's template: Flags and settings (none), Risk and rollback, the measurement columns named by commit, and the checklist; the in-game numbers are frome8c02084, the same renderer code.5e7d152878toac7ff6340e