Streamline frame generation and Reflex backend (opt-in, LARP_FG_BACKEND=streamline) #133

Manually merged
github merged 1 commit from github-bot/gh-133 into main 2026-12-05 20:45:50 +00:00 AGit
Owner

@⁠r32601366 on GitHub · 2026-12-05 19:23 UTC · original
r32601366:streamline-fg-backend → main · +1923 −19 · 9 files · 1 commits · merged 2026-12-05 20:43 UTC

A second backend for DLSS frame generation through NVIDIA Streamline,
split from #89 per review. Off unless LARP_FG_BACKEND=streamline (or sl)
is set; the default stays larp's own NGX path on Windows and under Wine
alike. Without the opt-in slfg::init is not called, nothing of
Streamline is loaded, and every hook below sees it as off.

With the opt-in:

  • sl.interposer.dll is loaded from LARP_STREAMLINE_DIR (or the usual
    folders) after an Authenticode check (WinVerifyTrust;
    LARP_STREAMLINE_VERIFY=0 skips it), before the host device is made.
  • host.rs: the direct queue is made through Streamline's device proxy,
    the swap chain through its DXGI factory proxy (LARP_SL_BUFFERS back
    buffers, default 4), and each present is tagged with the depth and
    motion vector copies dlssfg already takes at the upscaler dispatch,
    plus constants built from the same camera. larp's own frame
    generation present stays out while Streamline owns the swap chain.
  • reflex.rs: sleep mode, sleep and PCL markers go through Streamline
    (DLSS-G needs them); Reflex is forced on while Streamline generates.
  • slfg/abi.rs: the Streamline structures, with layout tests against the
    SDK headers' sizes and offsets.
  • Per-report Streamline counters in the frame-rate report (debug level)
    and a status line in the F10 menu.
  • docs/environment-variables.md: LARP_FG_BACKEND and the Streamline
    variables.

Not included from #89: the always-on 5 s presentation log of larp's own
frame generation (dlssfg live_report), Wine defaults, native mouse.

Build: cross-built for x86_64-pc-windows-gnullvm, no errors. Not run in game on this branch.

**@⁠r32601366** on GitHub · 2026-12-05 19:23 UTC · [original](https://github.com/gamingwithhomie/larp/pull/133) `r32601366:streamline-fg-backend` → `main` · +1923 −19 · 9 files · 1 commits · merged 2026-12-05 20:43 UTC A second backend for DLSS frame generation through NVIDIA Streamline, split from #89 per review. Off unless LARP_FG_BACKEND=streamline (or sl) is set; the default stays larp's own NGX path on Windows and under Wine alike. Without the opt-in slfg::init is not called, nothing of Streamline is loaded, and every hook below sees it as off. With the opt-in: - sl.interposer.dll is loaded from LARP_STREAMLINE_DIR (or the usual folders) after an Authenticode check (WinVerifyTrust; LARP_STREAMLINE_VERIFY=0 skips it), before the host device is made. - host.rs: the direct queue is made through Streamline's device proxy, the swap chain through its DXGI factory proxy (LARP_SL_BUFFERS back buffers, default 4), and each present is tagged with the depth and motion vector copies dlssfg already takes at the upscaler dispatch, plus constants built from the same camera. larp's own frame generation present stays out while Streamline owns the swap chain. - reflex.rs: sleep mode, sleep and PCL markers go through Streamline (DLSS-G needs them); Reflex is forced on while Streamline generates. - slfg/abi.rs: the Streamline structures, with layout tests against the SDK headers' sizes and offsets. - Per-report Streamline counters in the frame-rate report (debug level) and a status line in the F10 menu. - docs/environment-variables.md: LARP_FG_BACKEND and the Streamline variables. Not included from #89: the always-on 5 s presentation log of larp's own frame generation (dlssfg live_report), Wine defaults, native mouse. Build: cross-built for x86_64-pc-windows-gnullvm, no errors. Not run in game on this branch.
A second backend for DLSS frame generation through NVIDIA Streamline,
split from #89 per review. Off unless LARP_FG_BACKEND=streamline (or sl)
is set; the default stays larp's own NGX path on Windows and under Wine
alike. Without the opt-in slfg::init is not called, nothing of
Streamline is loaded, and every hook below sees it as off.

With the opt-in:
- sl.interposer.dll is loaded from LARP_STREAMLINE_DIR (or the usual
  folders) after an Authenticode check (WinVerifyTrust;
  LARP_STREAMLINE_VERIFY=0 skips it), before the host device is made.
- host.rs: the direct queue is made through Streamline's device proxy,
  the swap chain through its DXGI factory proxy (LARP_SL_BUFFERS back
  buffers, default 4), and each present is tagged with the depth and
  motion vector copies dlssfg already takes at the upscaler dispatch,
  plus constants built from the same camera. larp's own frame
  generation present stays out while Streamline owns the swap chain.
- reflex.rs: sleep mode, sleep and PCL markers go through Streamline
  (DLSS-G needs them); Reflex is forced on while Streamline generates.
- slfg/abi.rs: the Streamline structures, with layout tests against the
  SDK headers' sizes and offsets.
- Per-report Streamline counters in the frame-rate report (debug level)
  and a status line in the F10 menu.
- docs/environment-variables.md: LARP_FG_BACKEND and the Streamline
  variables.

Not included from #89: the always-on 5 s presentation log of larp's own
frame generation (dlssfg live_report), Wine defaults, native mouse.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 19:26:28 +00:00
Author
Owner

@⁠Heliumrich on GitHub · 2026-12-05 19:37 UTC · original

Nice, FG through streamline usually has better framepacing than NGX

**@⁠Heliumrich** on GitHub · 2026-12-05 19:37 UTC · [original](https://github.com/gamingwithhomie/larp/pull/133#issuecomment-7444142208) Nice, FG through streamline usually has better framepacing than NGX
github-bot referenced this pull request from a commit 2026-12-05 20:45:13 +00:00
github manually merged commit 85dcf3d8eb into main 2026-12-05 20:45:50 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.