Route FSR display presents through Streamline #1509

Merged
Nazzgy merged 1 commit from upstream-pr/1509 into main 2026-11-29 08:16:56 +00:00
Nazzgy commented 2026-11-28 21:02:40 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Nazzgy on 2026-11-28T21:02:40Z.


fix(gpu): route FSR display presents through Streamline

When DLSS Super Resolution and FSR 3 frame generation run together, FidelityFX owns the swap chain and bypasses Streamline's presentCommon() callback. Streamline reports the missing callback after repeated DLSS evaluations. It needs the callback for per-present resource retirement and memory bookkeeping.

Change

  • Add an opt-in VICTORY_FSR_STREAMLINE_PRESENT=1 path that supplies Streamline's DXGI factory proxy when FidelityFX creates its display swap chain. Host Present still goes directly to FidelityFX and receives the FidelityFX result. If the proxy or creation attempt fails, FidelityFX can use the native factory.
  • Extend upscaler-check --present with a DLSS and FSR 3 smoke test using synthetic inputs. The test evaluates DLSS once per frame, sends one logical present through FidelityFX and covers both sides of a resize. It retires frame-generation and swap-chain contexts before releasing the swap chain and shutting down Streamline.

Verification

RTX 3080, Streamline 2.14.16 and signed FidelityFX 2.4.0 runtime. Both runs used DLSS Performance, FSR 3 2× and 72 frames at each output size.

Configuration DLSS evaluations Presents with FSR active presentCommon() watchdog slShutdown and process exit
Native factory 144 144 Missing callback reported Exception handler 24, exit 0xC0000005
Streamline factory 144 144 Quiet through resize 0, exit 0

DLSS ran at 960 × 540 → 1920 × 1080, then 944 × 524 → 1888 × 1048. Both FidelityFX contexts were created at the expected sizes. The patched run destroyed its FidelityFX swap-chain context successfully.

A combined in-game Series S run with this change and the three other log fixes reached the saved game. The candidate factory initialized, DLSS Performance recorded 650 successful upscales through 960 × 540 → 1920 × 1080, and one interval reported 142 presents with FSR 3 active, zero off, and zero preparation failures. That gameplay sample recorded no missing-callback warning, refused present or device removal.

Reproduce with VICTORY_DLSS=1, VICTORY_DLSS_MODE=performance, VICTORY_FSR_FRAMEGEN=1, VICTORY_FRAMEGEN_X=2, and the two SDK directories configured. Run victory upscaler-check --present --output 1920x1080 with VICTORY_FSR_STREAMLINE_PRESENT=0, then repeat with 1.

The flag defaults off for wider compatibility testing. The smoke test covers lifecycle and feature activity. Display pacing and FPS require separate measurements.

NVIDIA manual hooking guide · AMD frame interpolation swap chain guide

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5544544076 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1509). Originally posted by [Nazzgy](https://github.com/Nazzgy) on 2026-11-28T21:02:40Z. --- # fix(gpu): route FSR display presents through Streamline When DLSS Super Resolution and FSR 3 frame generation run together, FidelityFX owns the swap chain and bypasses Streamline's `presentCommon()` callback. Streamline reports the missing callback after repeated DLSS evaluations. It needs the callback for per-present resource retirement and memory bookkeeping. ## Change - Add an opt-in `VICTORY_FSR_STREAMLINE_PRESENT=1` path that supplies Streamline's DXGI factory proxy when FidelityFX creates its display swap chain. Host `Present` still goes directly to FidelityFX and receives the FidelityFX result. If the proxy or creation attempt fails, FidelityFX can use the native factory. - Extend `upscaler-check --present` with a DLSS and FSR 3 smoke test using synthetic inputs. The test evaluates DLSS once per frame, sends one logical present through FidelityFX and covers both sides of a resize. It retires frame-generation and swap-chain contexts before releasing the swap chain and shutting down Streamline. ## Verification RTX 3080, Streamline 2.14.16 and signed FidelityFX 2.4.0 runtime. Both runs used DLSS Performance, FSR 3 2× and 72 frames at each output size. | Configuration | DLSS evaluations | Presents with FSR active | `presentCommon()` watchdog | `slShutdown` and process exit | | --- | ---: | ---: | --- | --- | | Native factory | 144 | 144 | Missing callback reported | Exception handler 24, exit `0xC0000005` | | Streamline factory | 144 | 144 | Quiet through resize | `0`, exit `0` | DLSS ran at 960 × 540 → 1920 × 1080, then 944 × 524 → 1888 × 1048. Both FidelityFX contexts were created at the expected sizes. The patched run destroyed its FidelityFX swap-chain context successfully. A combined in-game Series S run with this change and the three other log fixes reached the saved game. The candidate factory initialized, DLSS Performance recorded 650 successful upscales through 960 × 540 → 1920 × 1080, and one interval reported 142 presents with FSR 3 active, zero off, and zero preparation failures. That gameplay sample recorded no missing-callback warning, refused present or device removal. **Reproduce** with `VICTORY_DLSS=1`, `VICTORY_DLSS_MODE=performance`, `VICTORY_FSR_FRAMEGEN=1`, `VICTORY_FRAMEGEN_X=2`, and the two SDK directories configured. Run `victory upscaler-check --present --output 1920x1080` with `VICTORY_FSR_STREAMLINE_PRESENT=0`, then repeat with `1`. The flag defaults off for wider compatibility testing. The smoke test covers lifecycle and feature activity. Display pacing and FPS require separate measurements. [NVIDIA manual hooking guide](https://github.com/NVIDIA-RTX/Streamline/blob/main/docs/ProgrammingGuideManualHooking.md#20-manual-hooking-api) · [AMD frame interpolation swap chain guide](https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK/blob/main/Kits/FidelityFX/docs/techniques/frame-interpolation-swap-chain.md)
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
trustno1-coder/VIctory-NVIDIA!1509
No description provided.