NVIDIA wave32, capped view heap, present compose, and HUD improvements #103

Closed
rivaldodev wants to merge 1 commit from upstream-pr/103 into main
rivaldodev commented 2026-11-26 03:27:00 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by rivaldodev on 2026-11-26T03:27:00Z.


Summary

This PR ports NVIDIA-focused compatibility, stability, and quality-of-life improvements from rivaldodev/VItoriaBr (GPL-3.0-or-later) on top of VIctory-7900XTX's fast path, making this fork run great on NVIDIA GPUs as well (tested live on an NVIDIA RTX 5060 Ti 16 GB).

Shaders (NVIDIA wave32 stability & coverage)

  • Automatic divergent barrier guards on narrow-wave GPUs: guards single-console-wave barriers inside per-lane branches on wave32 hardware without disabling uniform barriers or translation-added sync.
  • Uniform first-lane wave-scan proofs: proves that a wave scan's first-lane value is uniform across both wave32 halves (with cycle proof seeding and stable LDS checks), avoiding invalid cross-wave barriers.
  • Signed 64-bit literal sign-extension: properly sign-extends 32-bit literals for signed 64-bit operands.

GPU (Capped 1M view heap, presentation & writeback)

  • VICTORY_DYNAMIC_SLOTS on capped view heaps: honors VICTORY_DYNAMIC_SLOTS on GPUs with a 1,000,000 view heap cap (such as NVIDIA), clamped up to half of the null slot, while keeping the existing uncapped behavior intact for AMD.
  • Second present plane composition (compose.rs, ported from trustno1-coder/VIctory-NVIDIA 7997a20 / fxceless PR 1189): composes the title's second present plane over the main frame.
  • Skip unnecessary table UAV writebacks: tracks which table UAV descriptors a shader actually stores to and skips writeback when the store targets another descriptor.
  • 2-line on-screen performance HUD (fpsbox.rs, VICTORY_FPS_COUNTER): shows FPS, frame time, draws/frame, resolution, VRAM usage, and GPU name (compact for FPS-only, 0 to disable).

Core / HLE / Build

  • Thin LTO (lto = thin) in [profile.release] (inherited by [profile.diag]).
  • VICTORY_HIDDEN_WINDOW: keeps the title window off-screen for unattended runs.
  • Config validation: rejects data_dir equal to or inside cache_dir.

Verification

  • cargo check --locked --workspace --tests — passed
  • cargo test --locked -p victory-core -p victory-gpu fpsbox — passed
  • cargo test --locked -p victory-shader a_first_lane_read_of_a_uniform_scan_carries_across_the_halves — passed
  • cargo build --locked --profile diag -p victory --features diagnostics — passed
  • Tested live in-game on NVIDIA hardware with scripts\play.ps1.
<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:issue:6618846137 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/103). Originally posted by [rivaldodev](https://github.com/rivaldodev) on 2026-11-26T03:27:00Z. --- ## Summary This PR ports NVIDIA-focused compatibility, stability, and quality-of-life improvements from [rivaldodev/VItoriaBr](https://github.com/rivaldodev/VItoriaBr) (GPL-3.0-or-later) on top of `VIctory-7900XTX`'s fast path, making this fork run great on NVIDIA GPUs as well (tested live on an NVIDIA RTX 5060 Ti 16 GB). ### Shaders (NVIDIA wave32 stability & coverage) - **Automatic divergent barrier guards on narrow-wave GPUs**: guards single-console-wave barriers inside per-lane branches on wave32 hardware without disabling uniform barriers or translation-added sync. - **Uniform first-lane wave-scan proofs**: proves that a wave scan's first-lane value is uniform across both wave32 halves (with cycle proof seeding and stable LDS checks), avoiding invalid cross-wave barriers. - **Signed 64-bit literal sign-extension**: properly sign-extends 32-bit literals for signed 64-bit operands. ### GPU (Capped 1M view heap, presentation & writeback) - **`VICTORY_DYNAMIC_SLOTS` on capped view heaps**: honors `VICTORY_DYNAMIC_SLOTS` on GPUs with a 1,000,000 view heap cap (such as NVIDIA), clamped up to half of the null slot, while keeping the existing uncapped behavior intact for AMD. - **Second present plane composition** (`compose.rs`, ported from `trustno1-coder/VIctory-NVIDIA` `7997a20` / `fxceless` PR 1189): composes the title's second present plane over the main frame. - **Skip unnecessary table UAV writebacks**: tracks which table UAV descriptors a shader actually stores to and skips writeback when the store targets another descriptor. - **2-line on-screen performance HUD** (`fpsbox.rs`, `VICTORY_FPS_COUNTER`): shows FPS, frame time, draws/frame, resolution, VRAM usage, and GPU name (`compact` for FPS-only, `0` to disable). ### Core / HLE / Build - **Thin LTO** (`lto = thin`) in `[profile.release]` (inherited by `[profile.diag]`). - **`VICTORY_HIDDEN_WINDOW`**: keeps the title window off-screen for unattended runs. - **Config validation**: rejects `data_dir` equal to or inside `cache_dir`. ## Verification - `cargo check --locked --workspace --tests` — passed - `cargo test --locked -p victory-core -p victory-gpu fpsbox` — passed - `cargo test --locked -p victory-shader a_first_lane_read_of_a_uniform_scan_carries_across_the_halves` — passed - `cargo build --locked --profile diag -p victory --features diagnostics` — passed - Tested live in-game on NVIDIA hardware with `scripts\play.ps1`.
copilot-pull-request-reviewer[bot] commented 2026-11-26 03:27:17 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-26T03:27:17Z.


Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:review:6068157945 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/103#pullrequestreview-6068157945). Originally posted by [copilot-pull-request-reviewer[bot]](https://github.com/apps/copilot-pull-request-reviewer) on 2026-11-26T03:27:17Z. --- Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

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
avatarmanz/VIctory-7900XTX!103
No description provided.