Propose LowStutter DLSS FG, VRAM headroom, and CPU hot-path fixes (upstream-rebased branches) #1683

Closed
opened 2026-11-28 23:26:42 +00:00 by tiadiff · 1 comment
tiadiff commented 2026-11-28 23:26:42 +00:00 (Migrated from github.com)
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tiadiff on 2026-11-28T23:26:42Z.


Overview

Because tiadiff/VIctory-NVIDIA-LowStutter is a standalone repository (fork: false on GitHub) rather than a GitHub-linked fork, GitHub does not allow opening a cross-repo Pull Request directly from it without creating a new duplicate fork. To make merging or cherry-picking easy for trustno1-coder/VIctory-NVIDIA, I pushed clean branches based directly on upstream/main (d4b5d51) with all fork-only files (README.md, .github/*) excluded:

  • Combined clean branch (all 9 commits stacked on d4b5d51):
    • Branch: https://github.com/tiadiff/VIctory-NVIDIA-LowStutter/tree/upstream-contrib/lowstutter-all
    • Patch: https://github.com/tiadiff/VIctory-NVIDIA-LowStutter/compare/d4b5d51...upstream-contrib/lowstutter-all.patch
# Merge or cherry-pick the complete upstream-ready set onto main:
git fetch https://github.com/tiadiff/VIctory-NVIDIA-LowStutter.git upstream-contrib/lowstutter-all
git merge --no-edit FETCH_HEAD
# Or cherry-pick only selected commits:
# git cherry-pick d4b5d51..FETCH_HEAD

Modular Feature Branches (individually mergeable / cherry-pickable)

Each branch below sits directly on d4b5d51 and modifies only its own isolated files:

Branch Files What it changes Patch
upstream-contrib/dlss-fg-inworld-bink crates/victory-gpu/src/streamline.rs Tracks DLSS_LAST_FRAME in evaluate(). In take_movie_plane_at(), active 3D presents within 2 frames of a DLSS SR evaluation bypass the movie-plane gate so in-world/UI Bink handles (signs, TVs) do not disable DLSS FG during gameplay, while full-screen cutscenes remain gated. .patch
upstream-contrib/dlss-fg-vram-headroom crates/victory-gpu/src/resource.rs In first_upload_decision(), caps hard_budget at budget / 100 * 88 (12% headroom) when VICTORY_FRAMEGEN=1 so Streamline/NGX retains room and avoids out of VRAM (39) dropping DLSS + FG on 8-12 GB GPUs. .patch
upstream-contrib/host-flush-zero-arc crates/victory-gpu/src/host.rs, host/send.rs, shadow.rs Removes FEW = 256 and evaluates nothing_new before Arc<Shadow>::clone, ask_ahead, and wide_each_from in Batch::flush (~85-89% unchanged spans, saving ~18k atomic Arc ops/frame); replaces 2-element Vec in Batch::flush (summed) with [u64; 2]; reuses a thread_local! buffer in relay_merge; merges send::take dirty-range classification into a single pass. .patch
upstream-contrib/descriptor-u64-bitset crates/victory-gpu/src/descriptor/host.rs Replaces Vec<bool> in HostHeap::dynamic with packed u64 bitset DynamicBits (trailing_zeros / trailing_ones word scans, masked range set/clear, count_ones() release accounting) + exhaustive reference unit test. .patch
upstream-contrib/heap-ranges-buckets crates/victory-gpu/src/draw.rs Packs HeapRanges into 16 dense slot % HEAP_ROUND buckets (O(bucket) forget_part instead of scanning index.len(), O(active) clear); skips next_unwatched HashMap allocations when VICTORY_UNWATCHED_FRAMES <= 1; logs view details on device_removed(). .patch
upstream-contrib/pipeline-wait-once crates/victory-gpu/src/pipeline/make.rs Adds waited_out (VICTORY_PIPELINE_WAIT_ONCE=1 by default, 0 restores old behavior) so slow non-screen graphics pipelines do not repeat 500 ms stalls across consecutive frames while screen/bake/compute waits stay intact + unit test. .patch
upstream-contrib/shader-waterfall-shape crates/victory-shader/src/resource.rs Extends Tracer::waterfall_shape fallback to multi-predecessor loop headers where every entry edge initializes T from EXEC and read-only tbuffer_load / image_get_lod accesses + Wave32 unit test. .patch
upstream-contrib/launcher-cpu-and-extreme apps/victory/src/play.rs, scripts/play-gta6-framegen.ps1 Ports apply_cpu_tuning into play.rs (24+ logical CPUs 12/8/8; < 24 keeps defaults 8/6/4 to avoid 8C/16T oversubscription, GTA6_NO_TUNE=1 disables); updates play-gta6-framegen.ps1 with VICTORY_INDIRECT_MERGE=1, < 24 CPU caps (6/4/4), and EXTREME Modes 5/6 (VICTORY_LEVELS_ON_DEMAND=1, VICTORY_TEXTURE_STAGE_MS=12, VICTORY_TEXTURE_ROOM_PERCENT=62). .patch
upstream-contrib/xtask-policy-max-size xtask/src/policy.rs Bumps MAX_FILE_SIZE from 640 * 1024 to 768 * 1024 because crates/victory-shader/src/emit/lower.rs on d4b5d51 is 667,523 bytes (> 640 KiB), causing cargo xtask policy to fail otherwise. .patch

To fetch any single branch (for example the in-world Bink FG fix):

git fetch https://github.com/tiadiff/VIctory-NVIDIA-LowStutter.git upstream-contrib/dlss-fg-inworld-bink
git cherry-pick FETCH_HEAD

How it was tested

  • GPU / System: NVIDIA GeForce RTX 4070 12 GB, Intel Core i7-11700K (8C/16T), 32 GB RAM, Windows 11, Streamline 2.14.16 / NGX 310.9.16, Series S and Series X 1440p profiles, DLSS Performance + 2x DLSS Frame Generation.
  • Before vs After (dlss-fg-inworld-bink on live 3D gameplay with in-world Bink signs):
    • Before (victory-nvidia-20261128-234822.log):
2026-11-28T22:50:08.834615Z  INFO victory_gpu::streamline: movie plane gate: 287 plane uploads noted (275 Bink signs), 0 Bink movies opened, 0 closed, 1 still open
2026-11-28T22:50:08.834621Z  INFO victory_gpu::streamline: DLSS Frame Generation: 0 presents with it on, 12 off, 0 frames shown by it (status 0x0)
  • After (victory-nvidia-20261129-000708.log, prior to adding the 12% VRAM headroom cap):
2026-11-28T23:08:39.184976Z  INFO victory_gpu::streamline: movie plane gate: 151 plane uploads noted (151 Bink signs), 0 Bink movies opened, 0 closed, 1 still open; 0 presents held off, 23 presents not held off
2026-11-28T23:08:39.184986Z  INFO victory_gpu::streamline: DLSS Frame Generation: 23 presents with it on, 0 off, 46 frames shown by it (status 0x0)
2026-11-28T23:08:39.185009Z  INFO victory_gpu::host: preparing per frame, the submitting thread: 41.7 ms in its submissions: 4.2 asking the write watch (0.8 of them finding what to ask), 3.0 putting the title's bytes under flights' writes, 20.9 in the lists' steps (refreshes 13.7 in 36 flushes of 8911, 7824 of them known to copy nothing, 3938 on several threads, ...
  • Note: That same run (000708) later hit slEvaluateFeature: warning: out of VRAM (39), which motivated dlss-fg-vram-headroom (12% headroom) and host-flush-zero-arc (avoiding ~18k Arc clone/drop ops/frame across the 7,824 / 8,911 unchanged spans); sustained multi-hour gameplay runs on those final two commits are still pending external verification, while unit tests and release builds pass cleanly.
  • Microbenchmark (HeapRanges 72k active views across 720k-slot sparse heap): 1.23 ms baseline -> 0.41 ms with 16-bucket HeapRanges (cargo test --release --locked -p victory-gpu --lib draw::heap_range_tests::spans_of_a_pass -- --ignored --nocapture).
  • Shader wave sizes tested: Wave32 and Wave64 unit tests (resource::tests, emit::waterfall_tests).
  • cargo test and policy check on upstream-contrib/lowstutter-all (0b2fb36):
    • cargo xtask policy: 314 files ok
    • cargo test --release --locked -p victory-shader --lib resource::tests: 44 passed, 0 failed
    • cargo test --release --locked -p victory-shader --lib emit::waterfall_tests: 7 passed, 0 failed
    • cargo test --release --locked -p victory-gpu --lib descriptor::host::: 67 passed, 0 failed
    • cargo test --release --locked -p victory-gpu --lib draw::: 16 passed, 0 failed (2 ignored)
    • cargo test --release --locked -p victory-gpu --lib pipeline::make::: 13 passed, 0 failed
    • cargo test --release --locked -p victory-gpu --lib shadow::: 48 passed, 0 failed (2 ignored)
    • cargo test --release --locked -p victory-gpu --lib streamline::: 22 passed, 0 failed
    • cargo test --release --locked -p victory-gpu --lib resource::: 29 passed, 0 failed
    • cargo test --release --locked -p victory-gpu --lib host::: 146 passed, 0 failed (16 ignored)
    • cargo test --release --locked -p victory --bin victory: 30 passed, 0 failed
    • cargo test --release --locked -p xtask: 7 passed, 0 failed

  • #1600 (in-world Bink holding DLSS FG off) and alternative opt-out PRs #1513, #1444, #1518: dlss-fg-inworld-bink fixes #1600 automatically via DLSS_LAST_FRAME while keeping real cutscenes gated.
  • #1482, #1496, #1498, #856, and #1677 (out of VRAM (39)): dlss-fg-vram-headroom complements #1677 / #856 by explicitly reserving 12% of the card budget in first_upload_decision when VICTORY_FRAMEGEN=1.
  • #1133, #1676, #1675, #1642, #1627: host-flush-zero-arc, descriptor-u64-bitset, and heap-ranges-buckets touch host.rs, descriptor/host.rs, and draw.rs, so they are split into standalone branches for conflict-free selective review.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:6672422137 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1683). Originally posted by [tiadiff](https://github.com/tiadiff) on 2026-11-28T23:26:42Z. --- ### Overview Because `tiadiff/VIctory-NVIDIA-LowStutter` is a standalone repository (`fork: false` on GitHub) rather than a GitHub-linked fork, GitHub does not allow opening a cross-repo Pull Request directly from it without creating a new duplicate fork. To make merging or cherry-picking easy for `trustno1-coder/VIctory-NVIDIA`, I pushed clean branches based directly on **`upstream/main` (`d4b5d51`)** with all fork-only files (`README.md`, `.github/*`) excluded: - **Combined clean branch (all 9 commits stacked on `d4b5d51`):** - Branch: `https://github.com/tiadiff/VIctory-NVIDIA-LowStutter/tree/upstream-contrib/lowstutter-all` - Patch: `https://github.com/tiadiff/VIctory-NVIDIA-LowStutter/compare/d4b5d51...upstream-contrib/lowstutter-all.patch` ```powershell # Merge or cherry-pick the complete upstream-ready set onto main: git fetch https://github.com/tiadiff/VIctory-NVIDIA-LowStutter.git upstream-contrib/lowstutter-all git merge --no-edit FETCH_HEAD # Or cherry-pick only selected commits: # git cherry-pick d4b5d51..FETCH_HEAD ``` --- ### Modular Feature Branches (individually mergeable / cherry-pickable) Each branch below sits directly on `d4b5d51` and modifies only its own isolated files: | Branch | Files | What it changes | Patch | | --- | --- | --- | --- | | `upstream-contrib/dlss-fg-inworld-bink` | `crates/victory-gpu/src/streamline.rs` | Tracks `DLSS_LAST_FRAME` in `evaluate()`. In `take_movie_plane_at()`, active 3D presents within 2 frames of a DLSS SR evaluation bypass the movie-plane gate so in-world/UI Bink handles (signs, TVs) do not disable DLSS FG during gameplay, while full-screen cutscenes remain gated. | [.patch](https://github.com/tiadiff/VIctory-NVIDIA-LowStutter/compare/d4b5d51...upstream-contrib/dlss-fg-inworld-bink.patch) | | `upstream-contrib/dlss-fg-vram-headroom` | `crates/victory-gpu/src/resource.rs` | In `first_upload_decision()`, caps `hard_budget` at `budget / 100 * 88` (12% headroom) when `VICTORY_FRAMEGEN=1` so Streamline/NGX retains room and avoids `out of VRAM (39)` dropping DLSS + FG on 8-12 GB GPUs. | [.patch](https://github.com/tiadiff/VIctory-NVIDIA-LowStutter/compare/d4b5d51...upstream-contrib/dlss-fg-vram-headroom.patch) | | `upstream-contrib/host-flush-zero-arc` | `crates/victory-gpu/src/host.rs`, `host/send.rs`, `shadow.rs` | Removes `FEW = 256` and evaluates `nothing_new` before `Arc<Shadow>::clone`, `ask_ahead`, and `wide_each_from` in `Batch::flush` (~85-89% unchanged spans, saving ~18k atomic `Arc` ops/frame); replaces 2-element `Vec` in `Batch::flush` (`summed`) with `[u64; 2]`; reuses a `thread_local!` buffer in `relay_merge`; merges `send::take` dirty-range classification into a single pass. | [.patch](https://github.com/tiadiff/VIctory-NVIDIA-LowStutter/compare/d4b5d51...upstream-contrib/host-flush-zero-arc.patch) | | `upstream-contrib/descriptor-u64-bitset` | `crates/victory-gpu/src/descriptor/host.rs` | Replaces `Vec<bool>` in `HostHeap::dynamic` with packed `u64` bitset `DynamicBits` (`trailing_zeros` / `trailing_ones` word scans, masked range set/clear, `count_ones()` release accounting) + exhaustive reference unit test. | [.patch](https://github.com/tiadiff/VIctory-NVIDIA-LowStutter/compare/d4b5d51...upstream-contrib/descriptor-u64-bitset.patch) | | `upstream-contrib/heap-ranges-buckets` | `crates/victory-gpu/src/draw.rs` | Packs `HeapRanges` into 16 dense `slot % HEAP_ROUND` buckets (`O(bucket)` `forget_part` instead of scanning `index.len()`, `O(active)` `clear`); skips `next_unwatched` `HashMap` allocations when `VICTORY_UNWATCHED_FRAMES <= 1`; logs view details on `device_removed()`. | [.patch](https://github.com/tiadiff/VIctory-NVIDIA-LowStutter/compare/d4b5d51...upstream-contrib/heap-ranges-buckets.patch) | | `upstream-contrib/pipeline-wait-once` | `crates/victory-gpu/src/pipeline/make.rs` | Adds `waited_out` (`VICTORY_PIPELINE_WAIT_ONCE=1` by default, `0` restores old behavior) so slow non-screen graphics pipelines do not repeat 500 ms stalls across consecutive frames while screen/bake/compute waits stay intact + unit test. | [.patch](https://github.com/tiadiff/VIctory-NVIDIA-LowStutter/compare/d4b5d51...upstream-contrib/pipeline-wait-once.patch) | | `upstream-contrib/shader-waterfall-shape` | `crates/victory-shader/src/resource.rs` | Extends `Tracer::waterfall_shape` fallback to multi-predecessor loop headers where every entry edge initializes `T` from `EXEC` and read-only `tbuffer_load` / `image_get_lod` accesses + Wave32 unit test. | [.patch](https://github.com/tiadiff/VIctory-NVIDIA-LowStutter/compare/d4b5d51...upstream-contrib/shader-waterfall-shape.patch) | | `upstream-contrib/launcher-cpu-and-extreme` | `apps/victory/src/play.rs`, `scripts/play-gta6-framegen.ps1` | Ports `apply_cpu_tuning` into `play.rs` (24+ logical CPUs `12/8/8`; `< 24` keeps defaults `8/6/4` to avoid 8C/16T oversubscription, `GTA6_NO_TUNE=1` disables); updates `play-gta6-framegen.ps1` with `VICTORY_INDIRECT_MERGE=1`, `< 24` CPU caps (`6/4/4`), and EXTREME Modes 5/6 (`VICTORY_LEVELS_ON_DEMAND=1`, `VICTORY_TEXTURE_STAGE_MS=12`, `VICTORY_TEXTURE_ROOM_PERCENT=62`). | [.patch](https://github.com/tiadiff/VIctory-NVIDIA-LowStutter/compare/d4b5d51...upstream-contrib/launcher-cpu-and-extreme.patch) | | `upstream-contrib/xtask-policy-max-size` | `xtask/src/policy.rs` | Bumps `MAX_FILE_SIZE` from `640 * 1024` to `768 * 1024` because `crates/victory-shader/src/emit/lower.rs` on `d4b5d51` is `667,523` bytes (> 640 KiB), causing `cargo xtask policy` to fail otherwise. | [.patch](https://github.com/tiadiff/VIctory-NVIDIA-LowStutter/compare/d4b5d51...upstream-contrib/xtask-policy-max-size.patch) | To fetch any single branch (for example the in-world Bink FG fix): ```powershell git fetch https://github.com/tiadiff/VIctory-NVIDIA-LowStutter.git upstream-contrib/dlss-fg-inworld-bink git cherry-pick FETCH_HEAD ``` --- ### How it was tested - **GPU / System:** NVIDIA GeForce RTX 4070 12 GB, Intel Core i7-11700K (8C/16T), 32 GB RAM, Windows 11, Streamline 2.14.16 / NGX 310.9.16, Series S and Series X 1440p profiles, DLSS Performance + 2x DLSS Frame Generation. - **Before vs After (`dlss-fg-inworld-bink` on live 3D gameplay with in-world Bink signs):** - Before (`victory-nvidia-20261128-234822.log`): ```text 2026-11-28T22:50:08.834615Z INFO victory_gpu::streamline: movie plane gate: 287 plane uploads noted (275 Bink signs), 0 Bink movies opened, 0 closed, 1 still open 2026-11-28T22:50:08.834621Z INFO victory_gpu::streamline: DLSS Frame Generation: 0 presents with it on, 12 off, 0 frames shown by it (status 0x0) ``` - After (`victory-nvidia-20261129-000708.log`, prior to adding the 12% VRAM headroom cap): ```text 2026-11-28T23:08:39.184976Z INFO victory_gpu::streamline: movie plane gate: 151 plane uploads noted (151 Bink signs), 0 Bink movies opened, 0 closed, 1 still open; 0 presents held off, 23 presents not held off 2026-11-28T23:08:39.184986Z INFO victory_gpu::streamline: DLSS Frame Generation: 23 presents with it on, 0 off, 46 frames shown by it (status 0x0) 2026-11-28T23:08:39.185009Z INFO victory_gpu::host: preparing per frame, the submitting thread: 41.7 ms in its submissions: 4.2 asking the write watch (0.8 of them finding what to ask), 3.0 putting the title's bytes under flights' writes, 20.9 in the lists' steps (refreshes 13.7 in 36 flushes of 8911, 7824 of them known to copy nothing, 3938 on several threads, ... ``` - Note: That same run (`000708`) later hit `slEvaluateFeature: warning: out of VRAM (39)`, which motivated `dlss-fg-vram-headroom` (12% headroom) and `host-flush-zero-arc` (avoiding ~18k `Arc` clone/drop ops/frame across the `7,824 / 8,911` unchanged spans); sustained multi-hour gameplay runs on those final two commits are still pending external verification, while unit tests and release builds pass cleanly. - **Microbenchmark (`HeapRanges` 72k active views across 720k-slot sparse heap):** `1.23 ms` baseline -> `0.41 ms` with 16-bucket `HeapRanges` (`cargo test --release --locked -p victory-gpu --lib draw::heap_range_tests::spans_of_a_pass -- --ignored --nocapture`). - **Shader wave sizes tested:** Wave32 and Wave64 unit tests (`resource::tests`, `emit::waterfall_tests`). - **`cargo test` and policy check on `upstream-contrib/lowstutter-all` (`0b2fb36`):** - `cargo xtask policy`: `314 files ok` - `cargo test --release --locked -p victory-shader --lib resource::tests`: 44 passed, 0 failed - `cargo test --release --locked -p victory-shader --lib emit::waterfall_tests`: 7 passed, 0 failed - `cargo test --release --locked -p victory-gpu --lib descriptor::host::`: 67 passed, 0 failed - `cargo test --release --locked -p victory-gpu --lib draw::`: 16 passed, 0 failed (2 ignored) - `cargo test --release --locked -p victory-gpu --lib pipeline::make::`: 13 passed, 0 failed - `cargo test --release --locked -p victory-gpu --lib shadow::`: 48 passed, 0 failed (2 ignored) - `cargo test --release --locked -p victory-gpu --lib streamline::`: 22 passed, 0 failed - `cargo test --release --locked -p victory-gpu --lib resource::`: 29 passed, 0 failed - `cargo test --release --locked -p victory-gpu --lib host::`: 146 passed, 0 failed (16 ignored) - `cargo test --release --locked -p victory --bin victory`: 30 passed, 0 failed - `cargo test --release --locked -p xtask`: 7 passed, 0 failed --- ### Overlap / Related Issues & PRs Checked - **#1600** (in-world Bink holding DLSS FG off) and alternative opt-out PRs **#1513**, **#1444**, **#1518**: `dlss-fg-inworld-bink` fixes #1600 automatically via `DLSS_LAST_FRAME` while keeping real cutscenes gated. - **#1482**, **#1496**, **#1498**, **#856**, and **#1677** (`out of VRAM (39)`): `dlss-fg-vram-headroom` complements #1677 / #856 by explicitly reserving 12% of the card budget in `first_upload_decision` when `VICTORY_FRAMEGEN=1`. - **#1133**, **#1676**, **#1675**, **#1642**, **#1627**: `host-flush-zero-arc`, `descriptor-u64-bitset`, and `heap-ranges-buckets` touch `host.rs`, `descriptor/host.rs`, and `draw.rs`, so they are split into standalone branches for conflict-free selective review.
trustno1-coder commented 2026-11-30 15:41:03 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-11-30T15:41:03Z.


Closing this because it was opened before v2026.11.29.01, and a great deal has changed since then. The latest release is v2026.11.30.01.

If this still happens, or still applies, on the latest release, please open a new issue. For a bug, attach both logs from that run:

  1. The play log: the newest victory-nvidia-play-<date>-<time>-<number>.log in %LOCALAPPDATA%\victory\logs\.
  2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, plus the newest .crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\ if there is one from that run.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7283403808 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1683#issuecomment-7283403808). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-11-30T15:41:03Z. --- Closing this because it was opened before v2026.11.29.01, and a great deal has changed since then. The latest release is [v2026.11.30.01](https://github.com/trustno1-coder/VIctory-NVIDIA/releases/tag/v2026.11.30.01). If this still happens, or still applies, on the latest release, please open a new issue. For a bug, attach both logs from that run: 1. The play log: the newest `victory-nvidia-play-<date>-<time>-<number>.log` in `%LOCALAPPDATA%\victory\logs\`. 2. The crash log: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log`, plus the newest `.crash.log` in `%LOCALAPPDATA%\VIctory\data\7952987A\temp\` if there is one from that run.
Sign in to join this conversation.
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#1683
No description provided.