perf(streamline): fix FG/Reflex thrash, duplicate slSetConstants, Reflex sleep gating, and snapshot exhaustion #8

Manually merged
github merged 1 commit from github-bot/gh-8 into mega-upgrade-v3 2026-12-04 20:20:16 +00:00 AGit
Owner

@⁠MahanYTT on GitHub · 2026-12-04 17:55 UTC · original
MahanYTT:perf/streamline-fg-thrash → mega-upgrade-v3 · +137 −66 · 1 files · 1 commits · merged 2026-12-04 20:18 UTC

Summary

Fixes four Streamline Frame Generation / Reflex bugs identified in the 1440p RTX 5070 Ti gameplay log (1,115 FG toggles, 1,144 Reflex toggles, 556× commonInterface.h:576 slSetConstants duplicate-constants errors, 0 Reflex sleeps, and snapshot exhaustion):

  1. Disjoint even/odd Streamline frame tokens: Maps PCL/Reflex/DLSS-G presents (simulation_begin, simulation_end, render_submit_begin, present_begins) to strictly increasing even tokens and DLSS SR (record_mode) to strictly increasing odd tokens floored to PRESENT_BEGUN_FRAME. Eliminates cross-viewport and consecutive-present slSetConstants error 27 collisions under VICTORY_RELAY=2 and stops PCL timeline drift.
  2. Reflex sleep active whenever Streamline Reflex is enabled: reflex_active() now runs slReflexSleep whenever REFLEX_READY and REFLEX_SENT is On/Boost (including FG-driven VICTORY_FG_LIMIT_FPS=auto), while remaining off in REFLEX_OFF menu frames.
  3. Immediate SUBMITTED snapshot release & headroom: Consumes SUBMITTED via .take() in present_begins so Arc<FgSnapshot> is released immediately and raises MAX_FG_SNAPSHOTS from 8 to 12.
  4. Unit tests: Added 3 unit tests covering even/odd token disjointness, Reflex sleep gating, and snapshot headroom.

Verification

  • cargo clippy -p victory-gpu --target x86_64-pc-windows-msvc --tests -- -D warnings (0 warnings)
  • All 3 new unit tests verified passing.
**@⁠MahanYTT** on GitHub · 2026-12-04 17:55 UTC · [original](https://github.com/MahanYTT/VIctory-MA/pull/8) `MahanYTT:perf/streamline-fg-thrash` → `mega-upgrade-v3` · +137 −66 · 1 files · 1 commits · merged 2026-12-04 20:18 UTC ## Summary Fixes four Streamline Frame Generation / Reflex bugs identified in the 1440p RTX 5070 Ti gameplay log (1,115 FG toggles, 1,144 Reflex toggles, 556× `commonInterface.h:576` `slSetConstants` duplicate-constants errors, 0 Reflex sleeps, and snapshot exhaustion): 1. **Disjoint even/odd Streamline frame tokens**: Maps PCL/Reflex/DLSS-G presents (`simulation_begin`, `simulation_end`, `render_submit_begin`, `present_begins`) to strictly increasing even tokens and DLSS SR (`record_mode`) to strictly increasing odd tokens floored to `PRESENT_BEGUN_FRAME`. Eliminates cross-viewport and consecutive-present `slSetConstants` error `27` collisions under `VICTORY_RELAY=2` and stops PCL timeline drift. 2. **Reflex sleep active whenever Streamline Reflex is enabled**: `reflex_active()` now runs `slReflexSleep` whenever `REFLEX_READY` and `REFLEX_SENT` is `On`/`Boost` (including FG-driven `VICTORY_FG_LIMIT_FPS=auto`), while remaining off in `REFLEX_OFF` menu frames. 3. **Immediate `SUBMITTED` snapshot release & headroom**: Consumes `SUBMITTED` via `.take()` in `present_begins` so `Arc<FgSnapshot>` is released immediately and raises `MAX_FG_SNAPSHOTS` from `8` to `12`. 4. **Unit tests**: Added 3 unit tests covering even/odd token disjointness, Reflex sleep gating, and snapshot headroom. ## Verification - `cargo clippy -p victory-gpu --target x86_64-pc-windows-msvc --tests -- -D warnings` (0 warnings) - All 3 new unit tests verified passing.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-04 17:55:25 +00:00
github manually merged commit 4ba58378c8 into mega-upgrade-v3 2026-12-04 20:20:16 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.