NVIDIA-RTX / NVIDIA-RTX/Streamline

[DLSS-G] Add runtime gating of IDXGISwapChainProvider to prevent early PresentBefore hook

Open
#77 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ack bug
Dominant language
C
Stars
1.2k
Forks
159
PR merge metrics
No merged PRs in 30d

Description

We're integrating DLSS-G (DLSS Frame Generation) using the 4.0.2 version into a real-time Unreal Engine 5.5.4 game and encountering a critical issue:


🔥 Issue Summary

When the DLSS-G plugin is loaded (even with all activation cvars set to 0), the Streamline framework (version v2.7.30.afa89bde) immediately registers a DXGI PresentBefore hook via IDXGISwapChainProvider.

This causes a GPU hang in packaged builds when startup movies (e.g., Bink) are playing — even though DLSS-G is disabled in all config cvars.


🧪 Repro Conditions
  • DLSS-G plugin is "Enabled": true in .uproject (required to cook shaders like FStreamlineVelocityCombineCS)

  • DefaultEngine.ini has:

    r.Streamline.Enable=0
    r.Streamline.Load.DLSSG=0
    r.Streamline.DLSSG.Enable=0
    
    
    • Bink movie plugin plays a fullscreen startup movie
    • No DLSS-G features are initialized or used
    • On startup: GPU crash (device removed during early DXGI present)
    ✅ Expected Behavior

    If r.Streamline.Load.DLSSG=0, the DLSS-G module should not register any DXGI hooks during StartupModule() or plugin load time.

    This would allow us to:

    • Cook DLSS-G shaders
    • Delay plugin activation manually (e.g., after movie playback)
    • Avoid early DXGI interference
    🚧 Current Workarounds Attempted
    • Delayed LoadModuleChecked() → fails due to missing cooked shaders (requires "Enabled": true)
    • Runtime cvar toggling → DXGI hook already registered too early
    • Tried Optional: true and EnablePlugins.Add(...) — no effect
    • Full Streamline SDK integration → not applicable to DLSS-G (precompiled only)
    🧩 Suggested Solution

    Please consider exposing a cvar like:
    r.Streamline.DelayHookRegistrationUntilFirstPresent=1
    or a deferred DXGI hook registration like:

    if (r.Streamline.Load.DLSSG != 0)
    {
        RegisterIDXGISwapChainProvider();
    }
    
    
    

Torbjörn Söderman
Technical Director, GOALS

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the DLSS-G module's StartupModule() and trace where IDXGISwapChainProvider or the PresentBefore hook is registered. Check how r.Streamline.Load.DLSSG is read during plugin loading, then reproduce the packaged startup movie case with the cvar disabled and enabled. Done means no early hook when disabled while normal hook registration remains possible when enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, unreal-engine
Domain
computer-graphics, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.