fix(gpu): send valid frame count on DLSS-G off and show real Streamline refusal reason #237

Open
github-bot wants to merge 1 commit from github-bot/gh-237 into main AGit
Owner

@⁠BE29ZZ on GitHub · 2026-11-27 20:00 UTC · original
BE29ZZ:fix/dlssg-off-and-notice → main · +271 −66 · 3 files · 1 commits · open

Summary

Fixes two Streamline / DLSS Frame Generation bugs in crates/victory-gpu/src/streamline.rs:

  1. DLSS-G stuck on with code=38 (invalid state) on RTX 40 cards when 3x–6x is selected (addresses #138, item 4):

    • In present_begins, when turning DLSS Frame Generation off (e.g. menu/loading frames with no upscaling, or disabling FG), generated = wanted.max(2) - 1 bypassed the if on && generated > 1 clamp against num_frames_to_generate_max.
    • On an RTX 40 card (num_frames_to_generate_max == 1) with 3x–6x selected in F1, Streamline rejected slDLSSGSetOptions(DLSSG_OFF) with code=38 on every non-upscaled present, leaving calls.framegen_on stuck true and spamming errors (13,399 times in #138).
    • Extracted dlssg_generated_frames so turning DLSS-G off always passes num_frames_to_generate = 1 (matching resizing() and Streamline's numFramesToGenerate <= numFramesToGenerateMax check), while turning it on continues to clamp 3x–6x to the card's reported num_frames_to_generate_max. Also updates FG_TIMES and the DLSS Frame Generation switched log line consistently when off, and only logs the out-of-VRAM warning (code 39) when turning on.
  2. Misleading NOT ON THIS CARD (RTX 40 AND UP) notice when Windows HAGS is disabled or driver/OS is out of date (addresses #178, #179):

    • Previously load_and_init discarded the slIsFeatureSupported result code and Facts only tracked files_missing: bool vs dlss_fg_supported: bool, so RTX 40/50 cards with Windows Hardware-accelerated GPU Scheduling (HAGS) disabled (code 4, OS hardware scheduling disabled) printed DLSS FRAME GEN: NOT ON THIS CARD (RTX 40 AND UP) both on screen and in the console.
    • Added NoDlssFg (and DriverOutOfDate / OsOutOfDate / Other variants to NoDlss) with named abi::RESULT_* constants so notice_of and victory upscaler-check report the actual reason:
      • code 4 (HAGS off): DLSS FRAME GEN: WINDOWS GPU SCHEDULING (HAGS) IS OFF + TURN ON IN SETTINGS > DISPLAY > GRAPHICS, RESTART PC
      • code 2: driver out of date
      • code 3: Windows version out of date
      • missing submission line (VICTORY_THIN=1 / VICTORY_ASYNC_SUBMIT=1): reports submission line requirement
      • codes 6, 7, 32: keeps DLSS FRAME GEN: NOT ON THIS CARD (RTX 40 AND UP)
      • other Streamline failures: DLSS FRAME GEN: NOT AVAILABLE (SEE THE LOG)

Verification

Tested locally on Windows 11 x64, NVIDIA GeForce RTX 3060, Rust 1.98.1 (no game data / no RTX 40/50 hardware for in-game DLSS-G runtime test):

  • cargo clippy -p victory-gpu --all-targets --locked and --all-features: 0 new warnings in touched files.
  • cargo test -p victory-gpu --lib --locked streamline:: (default & --all-features): 13 passed, 0 failed (expanded the_notice_says_what_the_card_does and the_sdk_version_is_2_14_16 to cover all RESULT_* constants, HAGS/driver/OS/line/other notices with 52-char + font-glyph validation, and dlssg_generated_frames for 0/2x–6x on/off and clamping).
  • VICTORY_INDIRECT_REST=1 cargo test -p victory-gpu --lib --locked: 420 passed, 0 failed, 35 ignored.
  • cargo test -p xtask --locked: 6 passed, 0 failed.

AI-assisted; verified locally against unit and GPU tests (no game data).

**@⁠BE29ZZ** on GitHub · 2026-11-27 20:00 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/237) `BE29ZZ:fix/dlssg-off-and-notice` → `main` · +271 −66 · 3 files · 1 commits · open ### Summary Fixes two Streamline / DLSS Frame Generation bugs in `crates/victory-gpu/src/streamline.rs`: 1. **DLSS-G stuck on with `code=38` (`invalid state`) on RTX 40 cards when 3x–6x is selected (addresses #138, item 4):** - In `present_begins`, when turning DLSS Frame Generation **off** (e.g. menu/loading frames with no upscaling, or disabling FG), `generated = wanted.max(2) - 1` bypassed the `if on && generated > 1` clamp against `num_frames_to_generate_max`. - On an RTX 40 card (`num_frames_to_generate_max == 1`) with 3x–6x selected in F1, Streamline rejected `slDLSSGSetOptions(DLSSG_OFF)` with `code=38` on every non-upscaled present, leaving `calls.framegen_on` stuck `true` and spamming errors (13,399 times in #138). - Extracted `dlssg_generated_frames` so turning DLSS-G off always passes `num_frames_to_generate = 1` (matching `resizing()` and Streamline's `numFramesToGenerate <= numFramesToGenerateMax` check), while turning it on continues to clamp 3x–6x to the card's reported `num_frames_to_generate_max`. Also updates `FG_TIMES` and the `DLSS Frame Generation switched` log line consistently when off, and only logs the out-of-VRAM warning (code 39) when turning on. 2. **Misleading `NOT ON THIS CARD (RTX 40 AND UP)` notice when Windows HAGS is disabled or driver/OS is out of date (addresses #178, #179):** - Previously `load_and_init` discarded the `slIsFeatureSupported` result code and `Facts` only tracked `files_missing: bool` vs `dlss_fg_supported: bool`, so RTX 40/50 cards with Windows Hardware-accelerated GPU Scheduling (HAGS) disabled (`code 4`, `OS hardware scheduling disabled`) printed `DLSS FRAME GEN: NOT ON THIS CARD (RTX 40 AND UP)` both on screen and in the console. - Added `NoDlssFg` (and `DriverOutOfDate` / `OsOutOfDate` / `Other` variants to `NoDlss`) with named `abi::RESULT_*` constants so `notice_of` and `victory upscaler-check` report the actual reason: - `code 4` (HAGS off): `DLSS FRAME GEN: WINDOWS GPU SCHEDULING (HAGS) IS OFF` + `TURN ON IN SETTINGS > DISPLAY > GRAPHICS, RESTART PC` - `code 2`: driver out of date - `code 3`: Windows version out of date - missing submission line (`VICTORY_THIN=1` / `VICTORY_ASYNC_SUBMIT=1`): reports submission line requirement - `codes 6, 7, 32`: keeps `DLSS FRAME GEN: NOT ON THIS CARD (RTX 40 AND UP)` - other Streamline failures: `DLSS FRAME GEN: NOT AVAILABLE (SEE THE LOG)` ### Verification Tested locally on Windows 11 x64, NVIDIA GeForce RTX 3060, Rust 1.98.1 (no game data / no RTX 40/50 hardware for in-game DLSS-G runtime test): - `cargo clippy -p victory-gpu --all-targets --locked` and `--all-features`: 0 new warnings in touched files. - `cargo test -p victory-gpu --lib --locked streamline::` (default & `--all-features`): 13 passed, 0 failed (expanded `the_notice_says_what_the_card_does` and `the_sdk_version_is_2_14_16` to cover all `RESULT_*` constants, HAGS/driver/OS/line/other notices with 52-char + font-glyph validation, and `dlssg_generated_frames` for 0/2x–6x on/off and clamping). - `VICTORY_INDIRECT_REST=1 cargo test -p victory-gpu --lib --locked`: 420 passed, 0 failed, 35 ignored. - `cargo test -p xtask --locked`: 6 passed, 0 failed. AI-assisted; verified locally against unit and GPU tests (no game data).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 20:04:16 +00:00
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/streamline/fsr.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/237/head:github-bot/gh-237'
git switch 'github-bot/gh-237'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-237'
git switch 'github-bot/gh-237'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-237'
git switch 'github-bot/gh-237'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-237'
git switch 'main'
git merge --squash 'github-bot/gh-237'
git switch 'main'
git merge --ff-only 'github-bot/gh-237'
git switch 'main'
git merge 'github-bot/gh-237'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.