Optimize GPU residency and host scaling for NVIDIA workloads #4636

Closed
Davetheshrew-git wants to merge 34 commits from upstream-pr/4636 into main
Davetheshrew-git commented 2026-12-01 00:24:52 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Davetheshrew-git on 2026-12-01T00:24:52Z.


This PR improves GPU utilization and host-side scaling across different RAM and CPU configurations:

Keeps GPU render targets and shader buffers resident to reduce WDDM paging stalls
Adds automatic scaling for RAM tiers and logical CPU counts
Optimizes staging memory allocation and queue synchronization
Refines GPU copy, barrier, and ReBAR behavior
Removes legacy residency flags that were not sufficiently tested
Synchronizes Rust and PowerShell launcher defaults
Adds a React-based tuning console for launch and switch configuration
Updates documentation and launcher naming for VIctory-NVIDIA
Key changes
Added fast staging-memory zeroing with VICTORY_STAGING_FAST_ZERO
Synchronized GPU submission queues before command execution
Improved 16 GB/32 GB+ RAM worker scaling
Added automatic 16/24+ CPU worker pool tuning
Preserved safety guardrails for known face, hair, foliage, and memory issues
Improved shader-cache and pipeline preloading behavior
Updated CI and Clippy fixes for Rust 1.98.1
Added automatic and explicit ReBAR handling
Removed deprecated Steam launcher and old play-foxhound references
Validation
cargo xtask policy
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
cargo test --workspace --locked
cargo build --release --locked -p victory

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5576334673 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4636). Originally posted by [Davetheshrew-git](https://github.com/Davetheshrew-git) on 2026-12-01T00:24:52Z. --- This PR improves GPU utilization and host-side scaling across different RAM and CPU configurations: Keeps GPU render targets and shader buffers resident to reduce WDDM paging stalls Adds automatic scaling for RAM tiers and logical CPU counts Optimizes staging memory allocation and queue synchronization Refines GPU copy, barrier, and ReBAR behavior Removes legacy residency flags that were not sufficiently tested Synchronizes Rust and PowerShell launcher defaults Adds a React-based tuning console for launch and switch configuration Updates documentation and launcher naming for VIctory-NVIDIA Key changes Added fast staging-memory zeroing with VICTORY_STAGING_FAST_ZERO Synchronized GPU submission queues before command execution Improved 16 GB/32 GB+ RAM worker scaling Added automatic 16/24+ CPU worker pool tuning Preserved safety guardrails for known face, hair, foliage, and memory issues Improved shader-cache and pipeline preloading behavior Updated CI and Clippy fixes for Rust 1.98.1 Added automatic and explicit ReBAR handling Removed deprecated Steam launcher and old play-foxhound references Validation cargo xtask policy cargo clippy --workspace --all-targets --locked -- -D warnings cargo clippy --workspace --all-targets --all-features --locked -- -D warnings cargo test --workspace --locked cargo build --release --locked -p victory
captn-hook commented 2026-12-01 07:41:02 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by captn-hook on 2026-12-01T07:41:02Z.


Test data for the VICTORY_TEXTURE_SOFT_MB change here, on a 16 GB card (RTX 3080 Laptop 16 GB, Series S 960x540, DLSS Performance). Diagnostics build of main at 7d93ee07, scripts/bench.ps1, same save, 120 s windows. Flicker = frames with VICTORY_POP_WATCH blips.

soft cap 3000 (current default) unset (dynamic cap)
soft sweeps 129 0
texture copies made again 6,842 2,357
frames with flicker 5.8% 1.1%
fps 20.9 21.7

With 3000 the copies sat at about 3.1 GB, so the sweep ran all the time with about 1.4 GB of the card free. The visible effect was grey/neutral textures flashing in and out.

Two notes on the change:

  • "auto" isn't parsed by soft_budget(). It works only because the failed parse reads as unset and the dynamic cap takes over. An empty value or removing the line would say that directly.
  • It also drops the cap on 8 GB cards, which this data doesn't cover. A narrower option: keep 3000 but never trim below the dynamic room, i.e. max(soft, dynamic_texture_cap). That leaves small cards as they are and lifts the cap on large ones.

(Drafted with Claude Code from my own runs.)

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7304355081 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4636#issuecomment-7304355081). Originally posted by [captn-hook](https://github.com/captn-hook) on 2026-12-01T07:41:02Z. --- Test data for the `VICTORY_TEXTURE_SOFT_MB` change here, on a 16 GB card (RTX 3080 Laptop 16 GB, Series S 960x540, DLSS Performance). Diagnostics build of `main` at `7d93ee07`, `scripts/bench.ps1`, same save, 120 s windows. Flicker = frames with `VICTORY_POP_WATCH` blips. | | soft cap 3000 (current default) | unset (dynamic cap) | |---|---|---| | soft sweeps | 129 | 0 | | texture copies made again | 6,842 | 2,357 | | frames with flicker | 5.8% | 1.1% | | fps | 20.9 | 21.7 | With 3000 the copies sat at about 3.1 GB, so the sweep ran all the time with about 1.4 GB of the card free. The visible effect was grey/neutral textures flashing in and out. Two notes on the change: - `"auto"` isn't parsed by `soft_budget()`. It works only because the failed parse reads as unset and the dynamic cap takes over. An empty value or removing the line would say that directly. - It also drops the cap on 8 GB cards, which this data doesn't cover. A narrower option: keep 3000 but never trim below the dynamic room, i.e. `max(soft, dynamic_texture_cap)`. That leaves small cards as they are and lifts the cap on large ones. *(Drafted with Claude Code from my own runs.)*
trustno1-coder commented 2026-12-01 18:36:01 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:36:01Z.


Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7321199908 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4636#issuecomment-7321199908). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-12-01T18:36:01Z. --- Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

Pull request closed

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!4636
No description provided.