Streamline: rearm stuck DLSS Frame Generation before advancing SIMULATION_START #2938

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

@⁠Maverick0351a on GitHub · 2026-11-29 18:54 UTC · original
Maverick0351a:fix/streamline-rearm-before-sim-start → main · +13 −6 · 1 files · 1 commits · open

Fixes #

What it changes

  • In streamline::present_ends(), runs dlssg_get_state and the stuck-framegen dlssg_set_options(DLSSG_OFF) rearm while Streamline is still on frame, before calling marker(abi::SIMULATION_START, next) for frame + 1.
  • Previously, present_ends() advanced SIMULATION_START to frame + 1 on line 2814 before calling set_options(DLSSG_OFF) on line 2866. Because Streamline was already on frame + 1, both set_options(DLSSG_OFF) in present_ends() and set_options(DLSSG_ON) in present_begins() of frame + 1 fell within the same Streamline frame token frame + 1, causing Streamline to reject the DLSSG_ON call with code=21 (eErrorInvalidParameter):
    [streamline][error]dlfgEntry.cpp:544[slDLSSGSetOptions] Repeated slDLSSGSetOptions() call for the frame 35558

How it was tested

  • GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): NVIDIA GeForce RTX 5080 Laptop GPU (16 GB GDDR7, driver 621.24.0, Streamline 2.14.16 / NGX 310.9.16), Series X (1440p) and Series S (1080p), DLSS Quality, DLSS Frame Generation 4x, ray tracing off.
  • Before: On frame 35557, present_ends() logged frame=35557 presents=90 rearms=1 code=0 "DLSS Frame Generation showed one frame a present that long with more asked (status 0): switched off to be asked on again", and on frame 35558, present_begins() failed with WARN streamline: dlfgEntry.cpp:544[slDLSSGSetOptions] Repeated slDLSSGSetOptions() call for the frame 35558 and DLSS Frame Generation switched frame=35558 on=true times=4 code=21 result="error: invalid parameter".
  • After: set_options(DLSSG_OFF) runs under frame before SIMULATION_START(frame + 1), so present_begins() on frame + 1 is the sole slDLSSGSetOptions call for frame + 1.
  • cargo test passed for the crates it touches: yes (cargo test -p victory-gpu --lib rearm_tests, 3 passed).

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #592
**@⁠Maverick0351a** on GitHub · 2026-11-29 18:54 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2938) `Maverick0351a:fix/streamline-rearm-before-sim-start` → `main` · +13 −6 · 1 files · 1 commits · open Fixes # ## What it changes - In `streamline::present_ends()`, runs `dlssg_get_state` and the stuck-framegen `dlssg_set_options(DLSSG_OFF)` rearm while Streamline is still on `frame`, **before** calling `marker(abi::SIMULATION_START, next)` for `frame + 1`. - Previously, `present_ends()` advanced `SIMULATION_START` to `frame + 1` on line 2814 before calling `set_options(DLSSG_OFF)` on line 2866. Because Streamline was already on `frame + 1`, both `set_options(DLSSG_OFF)` in `present_ends()` and `set_options(DLSSG_ON)` in `present_begins()` of `frame + 1` fell within the same Streamline frame token `frame + 1`, causing Streamline to reject the `DLSSG_ON` call with `code=21 (eErrorInvalidParameter)`: `[streamline][error]dlfgEntry.cpp:544[slDLSSGSetOptions] Repeated slDLSSGSetOptions() call for the frame 35558` ## How it was tested - GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): NVIDIA GeForce RTX 5080 Laptop GPU (16 GB GDDR7, driver 621.24.0, Streamline 2.14.16 / NGX 310.9.16), Series X (1440p) and Series S (1080p), DLSS Quality, DLSS Frame Generation 4x, ray tracing off. - Before: On frame `35557`, `present_ends()` logged `frame=35557 presents=90 rearms=1 code=0 "DLSS Frame Generation showed one frame a present that long with more asked (status 0): switched off to be asked on again"`, and on frame `35558`, `present_begins()` failed with `WARN streamline: dlfgEntry.cpp:544[slDLSSGSetOptions] Repeated slDLSSGSetOptions() call for the frame 35558` and `DLSS Frame Generation switched frame=35558 on=true times=4 code=21 result="error: invalid parameter"`. - After: `set_options(DLSSG_OFF)` runs under `frame` before `SIMULATION_START(frame + 1)`, so `present_begins()` on `frame + 1` is the sole `slDLSSGSetOptions` call for `frame + 1`. - `cargo test` passed for the crates it touches: yes (`cargo test -p victory-gpu --lib rearm_tests`, 3 passed). ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #592
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 18:56:58 +00:00
Author
Owner

@⁠justrealyme on GitHub · 2026-11-29 19:24 UTC · original

Tested on RTX 5070 Ti (driver 621.40), Core Ultra 7 265K, Windows 11. Release build of 829188e with this PR applied, Series X, 1440p, DLSS Quality, DLSS frame generation 2x, VICTORY_ALIAS_TARGETS=0.

  • Without this PR, the play log showed the failure described here. Frame generation was rearmed 6 times, each followed by Repeated slDLSSGSetOptions() call for the frame, and there were 31 seconds with one frame shown per present.
  • With it, in a play session of about 2 minutes: 0 rearms, 0 repeated-call errors, and full 2x in 118 of 125 seconds (27.7 fps rendered, 54.9 shown).

The run with this PR also had VICTORY_ALIAS_TARGETS=0 set (from #1917), so the drop in stalls isn't measured against this PR alone. What the log shows for this PR is that the repeated-call error is gone. The build also compiled cleanly on top of 829188e.

Done with AI assistance (Claude Code).

**@⁠justrealyme** on GitHub · 2026-11-29 19:24 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2938#issuecomment-7261255132) Tested on **RTX 5070 Ti** (driver 621.40), Core Ultra 7 265K, Windows 11. Release build of 829188e with this PR applied, Series X, 1440p, DLSS Quality, DLSS frame generation 2x, `VICTORY_ALIAS_TARGETS=0`. - **Without this PR**, the play log showed the failure described here. Frame generation was rearmed 6 times, each followed by `Repeated slDLSSGSetOptions() call for the frame`, and there were 31 seconds with one frame shown per present. - **With it**, in a play session of about 2 minutes: 0 rearms, 0 repeated-call errors, and full 2x in 118 of 125 seconds (27.7 fps rendered, 54.9 shown). The run with this PR also had `VICTORY_ALIAS_TARGETS=0` set (from #1917), so the drop in stalls isn't measured against this PR alone. What the log shows for this PR is that the repeated-call error is gone. The build also compiled cleanly on top of 829188e. Done with AI assistance (Claude Code).
Author
Owner

@⁠ThePerfomance on GitHub · 2026-11-30 04:18 UTC · original · reviewed

Thanks for working on this, @⁠Maverick0351a. I tested af2b7e9 on an RTX 5070 with driver 621.24. The synthetic DLSS-G probe passed at the default rearm threshold. With VICTORY_FRAMEGEN_REARM=1, frames 45 and 46 received both DLSSG_ON and DLSSG_OFF. Streamline logged Repeated slDLSSGSetOptions() even though both calls returned 0 and the probe passed.

Would it make sense to track the last frame that called slDLSSGSetOptions and defer the rearm until a frame where the options have not already been set? If generated frames return meanwhile, the pending rearm can be dropped. Counting the attempt only after Streamline accepts DLSSG_OFF would also keep a rejected call from using up a retry. A small regression test with a rearm threshold of 1 could check that no frame gets both calls.

**@⁠ThePerfomance** on GitHub · 2026-11-30 04:18 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2938#pullrequestreview-6106834359) · **reviewed** Thanks for working on this, @⁠Maverick0351a. I tested `af2b7e9` on an RTX 5070 with driver 621.24. The synthetic DLSS-G probe passed at the default rearm threshold. With `VICTORY_FRAMEGEN_REARM=1`, frames 45 and 46 received both `DLSSG_ON` and `DLSSG_OFF`. Streamline logged `Repeated slDLSSGSetOptions()` even though both calls returned `0` and the probe passed. Would it make sense to track the last frame that called `slDLSSGSetOptions` and defer the rearm until a frame where the options have not already been set? If generated frames return meanwhile, the pending rearm can be dropped. Counting the attempt only after Streamline accepts `DLSSG_OFF` would also keep a rejected call from using up a retry. A small regression test with a rearm threshold of `1` could check that no frame gets both calls.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2938'
git switch 'github-bot/gh-2938'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2938'
git switch 'github-bot/gh-2938'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2938'
git switch 'main'
git merge --squash 'github-bot/gh-2938'
git switch 'main'
git merge --ff-only 'github-bot/gh-2938'
git switch 'main'
git merge 'github-bot/gh-2938'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!2938
No description provided.