fix(dlss): DLSS Frame Generation's own runtime in the game folder, and NGX left alone after refused sets #2598
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!2598
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/dlssg-runtime"
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?
The build puts only DLSS's runtime (
nvngx_dlss.dll) in the game'sngxfolder, so NGX takes the driver's own copy of DLSS Frame Generation's runtime. On an older driver that copy breaks DLSS-G: found and diagnosed by @nullifyshot on an RTX 5080, where the driver'snvngx_dlssg(310.2.1) makes 1 frame at most.What null found (same build and spot, windowed, switching live 2x → 3x → 4x → 2x; game fps):
nvngx_dlssg(310.2.1)ngx\0xbad00005, FAIL_InvalidParameter): each set paid for a wasted evaluation, and the game ran at half its rate with nothing made.Our own 5090 runs never showed it because our test folder had a copy of
nvngx_dlssg.dllput there by hand.What changes
scripts/ngx_sdk.py: DLSS Frame Generation's runtime in each platform's table (nvngx_dlssg.dll;libnvidia-ngx-dlssg.so.310.9.16), from the same pinned commit and SHA-256 checked, fetched with DLSS's runtime and installed beside it. An SDK folder fetched before this still installs DLSS's;--fetch-ngx-sdk(the Builder's DLSS tick) adds the new file on the next build, since it fetches whatever is missing.nx2/make_game.py:place_ngx_runtimeputs both in the game'sngxfolder and names them; with an older SDK folder it says how to get frame generation's; a folder rebuilt without DLSS loses both.gpu/vk/vk_dlss.cpp:nvngx_dlssgor NGX takes the driver's own copy.kFgRefusalsOff) give DLSS-G up, as three failed feature creations already do (start_failed): the built-in makes the frames, and V-Sync Auto goes back to its mode without DLSS-G. A set made counts them from 0 again.scripts/linux/ngx-sdk.shname both runtimes.Tested
ngx\with nothing copied by hand:NVIDIA DLSS Frame Generation: ...\ngx\nvngx_dlssg.dll (NVIDIA's too). A headless run then logsavailable, up to 5 made frames between two of the game's (its runtime: the newest nvngx_dlssg.dll in ...\ngx, ...).tests/run_all.py(Windows, llvm-mingw): 435 passed, 35 skipped, 3 failed, all outside this PR and failing the same on main here:test_env_on(#2470'sHOS_FPS_LOG),test_vram_budget_row,test_portable_builder_startup(itsdotnet publishneeds packages this PC doesn't have).test_ngx_sdk.pyandtest_make_game_ngx.pycover both runtimes and an older SDK folder. The newtest_dlssg_runtime.pychecks the refusal limit, its reset after a made set, the once-said warning, the start line, and thatvk_dlss.cpplooks for the same namengx_sdk.pyinstalls. Four mutations (no reset, no guard, nostart_failed, a different name) each fail it.vk_dlss.cppwith the NGX headers.Not tested here: the refusal limit in game. It needs a driver whose
nvngx_dlssgrefuses sets, and this PC's runs use the SDK's. @nullifyshot, if you can, a run on this branch with the driver's copy (nonvngx_dlssg.dllinngx\) should show "3 sets in a row refused ... off" at 2x and the game back at its normal rate.🤖 Generated with Claude Code
Thanks, and thanks to @nullifyshot for the diagnosis: the 2x numbers (34 fps against 97 with the SDK's
nvngx_dlssg) make the case clearly.What I checked:
nvngx_dlssg.dll, Linuxlibnvidia-ngx-dlssg.so.310.9.16).install_runtimeskips the missing frame-gen file, and--fetch-ngx-sdk(fetch_ngx_sdk, thenfetch_one) downloads only what's missing, so the Builder's tick adds the file on the next build as the description says.nvngx_dlss.dll/libnvidia-ngx-dlss.sodon't prefix-match thedlssgfiles, either inngx_init's runtime check or in the Linux Builder'shas_runtime.start_failedmakesdlss_fg_runssay no, and a made set resets the count to 0.test_dlssg_runtime.pypasses on both Linux and Windows in CI.test_env_on.pyin two shards. It fails the same way on main right now, so that's not this PR.One small thing, inline: after the give-up, the DLSS-G feature stays allocated.
Nits, not blocking:
nvngx_dlss.dll/libnvidia-ngx-dlss.so. The Linux tip about copyinglibnvidia-ngx-dlss.so.*into$XDG_DATA_HOME/hookshot/ngxfor a folder whose path isn't ASCII now needs thedlssgfile too. In that case,fg_start's new line would also say "its runtime: the newest ... in" while NGX actually can't load it from there.fetch()'s docstring still says "runtime=False: not DLSS's runtime"; it now leaves out both runtimes.Approving. It would be nice if the in-game check of the refusal path you asked @nullifyshot for happens, but it doesn't block this: with the SDK's runtime now in
ngx/, that path is the fallback.After the give-up,
dlss_fg_framesis still called on every present (vk_framegen.cpp calls it whenever m > 1). It returns here, butg.featurefrom the refused sets stays made, along with its memory, for the rest of the run at 2x and up.dlss_fg_idleonly lets it go at Off/Auto. The three-failed-creations path has no feature to hold, so this is new.fg_releaseidles the queue first, so letting it go here once is safe:Thanks for checking the hashes against the pinned commit. All in
0f70ceaa:fg_release, which idles the queue first) and then returns.fg_startnow runs the same real-path ASCII check asngx_initdoes for DLSS's runtime. Alibnvidia-ngx-dlssg.sofound only in folders named otherwise is reported as not loadable, with the driver's own copy in use, instead of "its runtime: ..."..sofiles) and CONTRIBUTING.md name both runtimes.fetch()'s docstring saysruntime=Falseleaves both out.test_dlssg_runtime.pyalso checks the release and the Linux path check; six mutations each fail it.run_all.pyhere: 435 passed, the same 3 failing as on main (test_env_on,test_vram_budget_row, andtest_portable_builder_startup, which needs dotnet packages this PC lacks).github-sync referenced this pull request2026-11-12 06:22:54 +00:00
github-sync referenced this pull request2026-11-12 16:55:16 +00:00