fix(vk): a DLSS feature that fails to be made is made again at the next DLSS change, not never #2550
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!2550
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/dlss-recover-failed-feature"
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?
Switching the DLSS model quickly in the menu can turn DLSS off for the rest of the run: the picture falls back to the game's own upscale (sharp, aliased hair and edges), going back to the first model does nothing, and only a restart brings DLSS back, with no message saying so.
Why it happens
Each DLSS model change makes a new NGX feature; the one it replaces is let go 4 frames later (
temporal_later). Switching faster than that keeps several alive at once: DLSS's own memory went from 143 MB to 1173 MB and VRAM to 7.6 of 6.8 GB, and NGX then refused the next one:(
0xbad00002isNVSDK_NGX_Result_FAIL_PlatformError.)preparereturned -1 for a feature that was not made, and the chain (vk_temporal.cpp) takes -1 as a failed engine:engine.failedstays set for the run.What changed
gpu/vk/vk_dlss.cppprepare: a feature that is not made returns 0 (the game's upscale this frame) instead of -1, and remembers the preset, output and HDR it failed for. It is not tried again every frame (each try is a ~30 ms creation), but as soon as any of them changes, e.g. another DLSS model picked in the menu, it is made again. A success clears it.tests/test_dlss_checks.py: checks thatprepareno longer returns -1 for it and keeps the retry key.Not in this PR: letting the replaced feature go sooner, so quick switching does not pile up video memory in the first place.
Screenshots
2560x1440, DLAA, after quick DLSS model switches. Before: the game's upscale for the rest of the run, whichever model is picked. After: DLSS back on the next model change.
Testing
RTX 3060 Ti LHR (8 GB), driver 32.0.16.1062, Windows 11, 2560x1440, DLAA, Kokiri Forest. The same change built onto v2.1.0's renderer (
RX_VK_ONLY=1, the installed game's interface version), switching the DLSS model quickly in play:DLSS came back on the next model change, without a restart, and kept working through feature 25.
python -I -B tests/test_dlss_checks.pypasses.tests/run_all.pyon Windows: 387 passed, 5 failed (test_fpx_sticky,test_prepare_at_build,nx2/test_nup_paths,test_bake_portability,test_vram_budget_row), the same 5 failing onmainwithout this change on this PC.github-sync referenced this pull request2026-11-12 06:22:54 +00:00