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

Merged
loftymocha merged 3 commits from upstream-pr/186 into main 2026-11-27 07:56:35 +00:00
loftymocha commented 2026-11-27 07:08:16 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by loftymocha on 2026-11-27T07:08:16Z.


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

<!-- greyfinch-sync:TaynanGT/Vice-Tay:issue:5522685860 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/186). Originally posted by [loftymocha](https://github.com/loftymocha) on 2026-11-27T07:08:16Z. --- 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)
TaynanGT commented 2026-11-27 07:57:18 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-27T07:57:18Z.


@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.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7212984592 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/186#issuecomment-7212984592). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T07:57:18Z. --- @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.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
TaynanGT/Vice-Tay!186
No description provided.