DLSS: refuse to start without an application nvngx_dlss.dll (#176) #186

Manually merged
github merged 3 commits from github-bot/gh-186 into gh-pr/186/base 2026-11-27 07:58:11 +00:00 AGit
Owner

@⁠loftymocha on GitHub · 2026-11-27 07:08 UTC · original
loftymocha:fix/dlss-missing-snippet-v2 → main · +72 −14 · 2 files · 3 commits · merged 2026-11-27 07:56 UTC

Fixes the start-up crash from #176 (case 1). With VICTORY_DLSS set and no application copy of nvngx_dlss.dll, NGX crashes inside NVSDK_NGX_D3D12_Init_ProjectID itself (an access violation in _nvngx.dll), so no result check can catch it.

Seen on:

  • RTX 3080, driver 610.88 (_nvngx.dll 32.0.16.1088)
  • RTX 5070, driver 617.42 (_nvngx.dll 32.0.16.1742), offset 0x44e54

On the 5070 it crashed the same way:

  • with VICTORY_DLSS_NO_UPDATE=1
  • with VICTORY_DLSS_DIR set to an empty folder
  • even though NGX's models folder held a generic DLSS 310 model its updater had fetched earlier

The only setup that started was an application copy of the DLL (NVIDIA's DLSS SDK nvngx_dlss.dll 310.9.16) in VICTORY_DLSS_DIR.

Change (fidelityfx/dlss.rs only): before NGX is initialized, start looks for nvngx_dlss.dll in the feature folder, then beside the executable. Without one it returns an error saying what to do, so the existing fallbacks take over:

  • the 4K and Series S paths use FSR when a FidelityFX folder is set;
  • otherwise they stop with that message instead of crashing in NGX.

VICTORY_DLSS_TRUST_NGX=1 skips the check, for machines where NGX's own copy works.

Tested on bcbb795 + this commit, RTX 5070 / 617.42, diag build, Series S, VICTORY_DLSS=quality, no FidelityFX folder:

  • No DLL folder: the run stops right away with Error: initializing DLSS for Series S / no nvngx_dlss.dll in the DLSS folder (not set) or beside the executable; …. NGX isn't loaded, and no Application Error is logged. Before the change it crashed ~5 s after launch every time.
  • VICTORY_DLSS_DIR with the SDK DLL: NVIDIA DLSS serves the title's upscaler, then Series S: DLSS selected, as before.
  • cargo test --locked -p victory-hle --lib dlss: 16 passed, 0 failed.

Not covered: the shutdown crash (case 2 of #176). I couldn't reproduce it on 617.42: one DLSS session closed through the window without a crash.

AI-assisted (Claude Code).

🤖 Generated with Claude Code

**@⁠loftymocha** on GitHub · 2026-11-27 07:08 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/186) `loftymocha:fix/dlss-missing-snippet-v2` → `main` · +72 −14 · 2 files · 3 commits · merged 2026-11-27 07:56 UTC Fixes the start-up crash from #176 (case 1). With `VICTORY_DLSS` set and no application copy of `nvngx_dlss.dll`, NGX crashes inside `NVSDK_NGX_D3D12_Init_ProjectID` itself (an access violation in `_nvngx.dll`), so no result check can catch it. Seen on: - RTX 3080, driver 610.88 (`_nvngx.dll` 32.0.16.1088) - RTX 5070, driver 617.42 (`_nvngx.dll` 32.0.16.1742), offset `0x44e54` On the 5070 it crashed the same way: - with `VICTORY_DLSS_NO_UPDATE=1` - with `VICTORY_DLSS_DIR` set to an empty folder - even though NGX's models folder held a generic DLSS 310 model its updater had fetched earlier The only setup that started was an application copy of the DLL (NVIDIA's DLSS SDK `nvngx_dlss.dll` 310.9.16) in `VICTORY_DLSS_DIR`. **Change** (`fidelityfx/dlss.rs` only): before NGX is initialized, `start` looks for `nvngx_dlss.dll` in the feature folder, then beside the executable. Without one it returns an error saying what to do, so the existing fallbacks take over: - the 4K and Series S paths use FSR when a FidelityFX folder is set; - otherwise they stop with that message instead of crashing in NGX. `VICTORY_DLSS_TRUST_NGX=1` skips the check, for machines where NGX's own copy works. **Tested** on `bcbb795` + this commit, RTX 5070 / 617.42, diag build, Series S, `VICTORY_DLSS=quality`, no FidelityFX folder: - No DLL folder: the run stops right away with `Error: initializing DLSS for Series S` / `no nvngx_dlss.dll in the DLSS folder (not set) or beside the executable; …`. NGX isn't loaded, and no Application Error is logged. Before the change it crashed ~5 s after launch every time. - `VICTORY_DLSS_DIR` with the SDK DLL: `NVIDIA DLSS serves the title's upscaler`, then `Series S: DLSS selected`, as before. - `cargo test --locked -p victory-hle --lib dlss`: 16 passed, 0 failed. **Not covered:** the shutdown crash (case 2 of #176). I couldn't reproduce it on 617.42: one DLSS session closed through the window without a crash. *AI-assisted (Claude Code).* 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Without an application copy of nvngx_dlss.dll, NGX's own copy crashed
inside NVSDK_NGX_D3D12_Init_ProjectID (access violation in _nvngx.dll,
drivers 610.88 and 617.42, #176), where no result can be checked. start()
now looks for the DLL in the feature folder, then beside the executable,
and returns an error saying what to do instead, so the existing fallbacks
(FSR when a folder is set, else a clear startup error) take over.
VICTORY_DLSS_TRUST_NGX=1 skips the check.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 07:08:28 +00:00
Validate the configured and application-local DLSS library paths before loading the driver core. Cover the missing library, application-local copy and configured-folder precedence.
Explain where to place the NVIDIA SDK library and when the configured FSR fallback is used.
github-bot changed target branch from main to gh-pr/186/base 2026-11-27 07:58:11 +00:00
github manually merged commit e85757afcf into gh-pr/186/base 2026-11-27 07:58:11 +00:00
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 07:57 UTC · original

@⁠loftymocha This is on main. The application DLL check now runs before loading _nvngx.dll, and the README covers the SDK copy and the configured FSR fallback. The 17 DLSS tests passed locally, including the missing-file case and configured-folder precedence. CI passed on the same revision. The shutdown report remains open in #176.

**@⁠TaynanGT** on GitHub · 2026-11-27 07:57 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/186#issuecomment-7212984592) @⁠loftymocha This is on `main`. The application DLL check now runs before loading `_nvngx.dll`, and the README covers the SDK copy and the configured FSR fallback. The 17 DLSS tests passed locally, including the missing-file case and configured-folder precedence. CI passed on the same revision. The shutdown report remains open in #176.
This discussion has been locked. Commenting is limited to contributors.
No description provided.