fix(vk): the menu says DLSS needs an RTX GPU only when NVIDIA's NGX says so #3074
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!3074
Loading…
Reference in a new issue
No description provided.
Delete branch "llun/Longshot:fix/dlss-needs-rtx-message"
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?
Summary
When NVIDIA's DLSS software (NGX) can't start, the Insert menu says "DLSS and DLAA: need an NVIDIA RTX GPU.", whatever the real reason is. A player with an RTX 3080 (nightly-1021-2ca7d4f7, Windows 11, driver 621.24) was told that. Their log has the real reason:
Why NGX can't find that path on their PC is not known. This PR does not make DLSS work for them; it makes the menu and the log say the right thing.
How to see it on
main: put a 4 KB file of zeros namednvngx_dlss.dllin the game folder'sngx(nothing else in it) and open the Insert menu's Upscaler row on an RTX card.mainThe log line holds NGX's answer each time. With Streamline running, 0xbad00004 is said as before.
Read first:
ngx_init_lockedand the newruntime_thereingpu/vk/vk_dlss.cpp(the old loop, moved, now taking only the runtime's own file, not a backup, and not throwing while it reads a folder); the new line isDLSS_NOT_STARTED, invk_menu.cpp, the graphics mod'smod.tomland the menu's 13 translations.Prior work: no other pull request or issue found for this message (dlss_why, ngx_init, "needs an NVIDIA RTX GPU"). See #3061, which fixed one cause of 0xbad00004 and names this wrong message.
Testing
Tested: Windows 11 (26300), RTX 5080, driver 621.47, the sandbox on, Kokiri Forest, headless
dev.py smokeruns (each PASS):nvngx_dlss.dll:mainlogs "DLSS needs an NVIDIA RTX GPU"; here the log says NGX did not load the file, with the answer, and the Upscaler row reads "DLSS and DLAA: NVIDIA's NGX could not start DLSS (the log says why)." (seen in a screenshot).nvngx_dlss.dll.bakinngx: "no nvngx_dlss.dll" here.ngxfolder: "no nvngx_dlss.dll" on both.tests/test_dlss_why.py(new) fails onmainand passes here, with clang and g++ on Windows and g++ on Linux (WSL);cargo testofapicovers the DLSS FG row's line.72b7fbc41(before the review's two fixes; the DLSS checks and lint ran again after them): 830 passed, 51 skipped (not for Windows), 3 failed.test_i18n_completefails the same way onmain(ReShade preset names, #3065).test_lifterstops atevery_site_has_one_owner_and_the_sites_are_the_ones_before_the_split, in hook sites this PR does not touch; it fails onmaintoo by #3068's run, and was not run again onmainhere.test_program_cache_store_recordfailed as the disk was full; run again alone it passes. About 3,200 Rust tests,api's and the menu's among them, passed before that stop; the crates after it did not run.mise run lintpasses.Still to test:
libnvidia-ngx-dlss.so*taken out ofngx, the Upscaler row says the runtime was not found (by hand)Not run in the game: NGX failing to start at all (the player's case); only the game-free test covers it, as this PC's NGX starts.
Measurements
Verdict: the menu and the log no longer blame an RTX card for a DLSS file that NGX could not load.
Setup: Windows 11, RTX 5080, driver 621.47, the sandbox on; a made-up
nvngx_dlss.dllalone in the game folder'sngx; the log'svk: NVIDIA DLSS:lineb4d56f526b1b433ee9test_dlss_why.pyIt changes no rendering: it runs once, when NGX is asked.
Risks
A GTX card on which NGX answers something other than "not supported" at its start now reads "could not start DLSS", not "needs an RTX GPU". No GTX was tested. Reverting is enough; nothing about saves, settings or caches changes.
Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named).main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here.Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
Tested in game: Windows 11 (26300), RTX 5080, driver 621.47, the sandbox on, Kokiri Forest, commit
72b7fbc41: with a made-up nvngx_dlss.dll the Upscaler row says NVIDIA's NGX could not start DLSS (main blamed the GPU in the log), with no ngx folder the log says the file is missing, and with the real files DLSS starts and draws. Not run: NGX failing to start at all, Linux, a GTX card.@review
Recommendation: Approve. The new runtime check can mistake a backup file for the DLL and give players the wrong diagnosis. The reported NGX startup failure also still needs an in-game check, alongside the listed Linux and GTX checks. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.
The change distinguishes several NGX failures in the Upscaler and DLSS Frame Generation messages. It improves the tested Windows failure message, but its file-name check can still produce a misleading diagnosis.
Should fix (2): not blocking, but worth doing before merging.
gpu/vk/vk_dlss.cpp:765: The runtime check accepts any filename beginning with the runtime name, including backup files that NGX cannot load. (more on the line) Do: Match the exact DLL name on Windows and only valid shared-library names and version suffixes on Linux; add a test with a backup file but no runtime.gpu/vk/vk_dlss.cpp:764: The directory iterator uses the non-throwing constructor but throwing increments, so an error during enumeration can terminate the game while diagnosing an NGX failure. (more on the line) Do: Advance the iterator with increment(error_code) and handle an enumeration error without throwing.Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)
@fixcan do L1 and L2.Checks: Still running: 11 checks.
More: does it help, other systems, switches, what was read
Does it help: Yes for the tested missing and unloadable runtime cases: the author's Windows RTX 5080 run showed the new menu message and log where main blamed the GPU. The reported NGX startup failure is covered by the game-free test but has not been reproduced in game.
Other systems: The change affects NVIDIA NGX initialization and the Upscaler and DLSS FG hints; it does not change rendering. Linux NVIDIA, GTX, and the actual NGX startup-failure path remain untested in game. The new reason is published through the existing atomic status and settings snapshot; the DLSS FG row has a matching entry.
Switches: None added, changed, or removed.
Reviewed:
72b7fbc41bagainstb4d56f5264: Read the repository rules, contribution standards, pull request template, commit messages and full diff; read the new test and changed DLSS initialization and menu paths, and traced their callers and status consumers. Skimmed the translation files and surrounding large source files. docs/review-checklist.md and the adjacent Tooling checkout were absent.; nothing run (a code review).Checked and fine:
Testing: Read-only review; no code, tests, or project scripts were run. The author reports Windows in-game and game-free checks; CI is still running.
Overlaps and merge order: None reported; network access was unavailable.
Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.
@ -758,0 +761,4 @@bool there = false;std::error_code ec;for (const auto& d : dirs)for (const auto& f : fs::directory_iterator(d, ec))L2 (should fix): The directory iterator uses the non-throwing constructor but throwing increments, so an error during enumeration can terminate the game while diagnosing an NGX failure.
When: If a runtime directory becomes unavailable or an I/O error occurs after its iterator opens, the range loop's increment throws a filesystem_error on the initialization path rather than returning a diagnosis.
Do: Advance the iterator with increment(error_code) and handle an enumeration error without throwing.
@ -758,0 +762,4 @@std::error_code ec;for (const auto& d : dirs)for (const auto& f : fs::directory_iterator(d, ec))if (f.path().filename().native().rfind(kRuntimeName, 0) == 0) {L1 (should fix): The runtime check accepts any filename beginning with the runtime name, including backup files that NGX cannot load.
When: On Windows, if ngx contains nvngx_dlss.dll.bak but no nvngx_dlss.dll and NGX returns a platform error, runtime_there returns true and the menu says NGX could not start DLSS instead of saying the runtime is missing.
Do: Match the exact DLL name on Windows and only valid shared-library names and version suffixes on Linux; add a test with a backup file but no runtime.
Pushed
b1b433ee9, still on mainb4d56f526. Both of BeanBot's points are fixed:test_dlss_why.pyhas cases for these, and they failed on the code as first pushed.Tested again on Windows 11, RTX 5080, driver 621.47, with the sandbox on: DLSS in place (it draws), a made-up DLSS file, only a backup file, and no
ngxfolder. Each run passes and the log says the right thing. The 30 DLSS checks and lint pass, and the new test also passes on Linux (WSL). The whole suite has not run again.L3 is still open: NGX failing to start at all has only run in the test, and Linux NVIDIA and a GTX card have not been checked in the game.
72b7fbc41bb1b433ee93@review
Recommendation: Approve. The code is ready: only testing is left. The runtime filename and directory-iteration fixes address the two code items. The reported NGX startup failure and the Linux NVIDIA and GTX cases still need in-game checks. Recommend approval; not approved on the forge.
The menu and log give more specific reasons when DLSS cannot start. The change improves diagnosis without changing rendering, at the cost of a runtime-file check on failure paths.
Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)
Since the last review (on
72b7fbc41b)Resolved: L1 (The runtime check accepts any filename beginning with the runtime name, including backup f…); L2 (The directory iterator uses the non-throwing constructor but throwing increments, so an er…)
Still open: L3 (The reported NGX startup failure and the listed Linux and GTX cases have not been checked…)
Checks: Still running: 11 checks.
More: does it help, other systems, switches, what was read
Does it help: Yes for the tested file-load failure: the author reports that main blamed the GPU, while this head identifies the NGX file-load failure on Windows with an RTX 5080. The original NGX startup failure is covered by a game-free test but has not been reproduced in game.
Other systems: The check covers Windows and Linux runtime names and feeds both the upscaler and DLSS Frame Generation menu explanations. Linux NVIDIA and GTX behavior remain untested in game; the Windows RTX 5080 runs include working DLSS and missing or invalid runtime cases.
Switches: None added, changed or removed.
Reviewed:
b1b433ee93againstb4d56f5264: Read AGENTS.md, CONTRIBUTING.md, the changed test and the main diff; inspected the DLSS initialization and menu wiring. The large renderer files were only partially read, and translations and recorded runs were skimmed. Tooling's AGENTS.md was unavailable; docs/review-checklist.md was absent.; nothing run (a code review).Checked and fine:
Testing: No commands that build or run the project were executed. The author reports passing Windows RTX 5080 game checks and game-free tests on Windows and Linux; CI is still running.
Overlaps and merge order: No overlapping pull request identified in the supplied context.
Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.