victory-gpu: let the texture pass spend more of a frame on cards over 12 GB and while catching up; turn texture catch-up on #532

Merged
henriazz10 merged 1 commit from upstream-pr/532 into main 2026-11-28 19:39:39 +00:00
henriazz10 commented 2026-11-28 00:25:12 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by henriazz10 on 2026-11-28T00:25:12Z.


Summary

  • Root cause: apps/victory/src/play.rs set VICTORY_TEXSPK_PASS_MS=8, VICTORY_TEXTURE_CATCHUP=0, and VICTORY_TEXTURE_STAGE_MS=16. In crates/victory-gpu/src/draw.rs (State::heap_textures), texspk_pass_ms() clamped every frame's combined texture passes (early_textures + heap_textures) to 8 ms even when the card had gigabytes of free VRAM (0 held back for room, 0 at their bytes in victory-nvidia-play-20261127-233030-46360.log) and thousands of due slots (1,462-4,218 due, 1-8 frames late, 93 passes stopped at their time).
  • Fix:
    • Added texspk_cap_ms(base_cap_ms, vram_budget, room, pressured, catchup_active) in crates/victory-gpu/src/draw.rs: keeps base_cap_ms (8 ms) on <= 12 GiB cards, full cards (!room), or pressured host RAM; doubles the cap (16 ms) when vram_budget > 12 GiB and room is true; and triples the cap (24 ms, matching the 3x catch-up span and per_frame byte budget) when catchup_active (on_time >= 1024 && room && !pressured).
    • Enabled VICTORY_TEXTURE_CATCHUP=1 and raised VICTORY_TEXTURE_STAGE_MS=24 in apps/victory/src/play.rs. Safe on 12 GB cards because catch-up only activates when on_time >= 1024 && room && !pressured.
  • Files touched:
    • crates/victory-gpu/src/draw.rs
    • apps/victory/src/play.rs

Negative Control

Before implementing texspk_cap_ms scaling:

  • Command: cargo test -p victory-gpu --lib texspk_cap_scales_with_vram_and_catchup
  • Result: exit 1 (thread 'draw::tests::texspk_cap_scales_with_vram_and_catchup' panicked at crates\victory-gpu\src\draw.rs:6006:9: assertion 'left == right' failed: left: 8, right: 24)

Commands & Checks

  • cargo test -p victory-gpu --lib texspk_cap_scales_with_vram_and_catchup: exit 0 (1 passed; 0 failed)
  • cargo test -p victory --locked: exit 0 (23 passed; 0 failed unit + 2 passed; 0 failed integration)
  • git diff --check: exit 0
  • cargo fmt --all -- --check: exit 1 (pre-existing formatting diffs on main 64d4931 in untouched files and untouched lines of draw.rs / play.rs)
  • cargo clippy --workspace --all-targets --locked -- -D warnings: exit 101 (pre-existing clippy::precedence error in crates/victory-formats/src/texture.rs:1346)
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: exit 101 (same pre-existing error in crates/victory-formats/src/texture.rs:1346)
  • cargo test --workspace --locked: exit 101 (435 passed, 2 pre-existing failures in crates/victory-gpu/src/indirect.rs: host_list_budget_starts_empty_at_each_submission and warp_batch_charges_every_execution)

Before / After Game Runs

  • Environment: Windows 11 build 26300, NVIDIA GeForce RTX 5080 (16 GB), driver 616.92
  • Command (each run 60 s, release build, VICTORY_WARMUP_RESTART=0):
    victory.exe play <dump>\game_scarlett_master.exe --set VICTORY_WARMUP_RESTART=0
  • Before Run 1 (victory-nvidia-play-20261128-000026-51684.log):
    • Initial 5 s burst: 414.5 fps, 5 slots, 0 due (oldest 0 frames ago), 0 waiting, 13 stopped at their time (next 5 s: 14 stopped at their time, 0 slots, 0 due); steady title screen 419.9 fps.
  • Before Run 2 (victory-nvidia-play-20261128-000149-64144.log):
    • Steady title screen 430.0 fps, 0 slots, 0 due (oldest 0 frames ago), 0 waiting.
  • After Run 1 (victory-nvidia-play-20261128-000626-30924.log):
    • Initial 5 s burst: 422.1 fps, 5 slots, 0 due (oldest 0 frames ago), 0 waiting, 11 stopped at their time (next 5 s: 7 stopped at their time, 0 slots, 0 due, 427.2 fps).
  • After Run 2 (victory-nvidia-play-20261128-000757-40524.log):
    • Initial 5 s burst: 429.8 fps, 0 slots, 0 due (oldest 0 frames ago), 0 waiting, 5 stopped at their time (next 5 s: 8 stopped at their time, 428.1 fps).

Hand test in play (reviewer)

The runs above never left the title screen, so they say nothing about streaming. The user then played a build of this branch together with #516 (cherry-picked on top, main 64d4931) on the RTX 5080: open water, the bridge, mangroves, with DLSS frame generation on at times. Window title: 16-18 fps rendered (32 fps with frame generation) at 3900-6250 draws/frame; dedicated card memory peaked at 13.3 of 16 GB. The user called it the best build so far ("the best so far"). That is a subjective comparison, not a measurement, and it does not separate this change from #516. Some rectangular patches on the water, under the bridge, are still visible; those are left for a separate change.

What Was Not Tested

  • Unattended 60 s runs stop at the title screen (no controller/keyboard input to press A and enter street gameplay, where 1,462-4,218 due-slot bursts occur); the in-game catch-up path (on_time >= 1024) is verified by unit test texspk_cap_scales_with_vram_and_catchup and analyzed against victory-nvidia-play-20261127-233030-46360.log.

AI-assisted. Gemini 4 Hydrogen (Antigravity CLI) wrote the change and ran the checks; Claude Code reviewed it.

🤖 Generated with Claude Code

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5534894444 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/532). Originally posted by [henriazz10](https://github.com/henriazz10) on 2026-11-28T00:25:12Z. --- ## Summary - Root cause: `apps/victory/src/play.rs` set `VICTORY_TEXSPK_PASS_MS=8`, `VICTORY_TEXTURE_CATCHUP=0`, and `VICTORY_TEXTURE_STAGE_MS=16`. In `crates/victory-gpu/src/draw.rs` (`State::heap_textures`), `texspk_pass_ms()` clamped every frame's combined texture passes (`early_textures` + `heap_textures`) to 8 ms even when the card had gigabytes of free VRAM (`0 held back for room`, `0 at their bytes` in `victory-nvidia-play-20261127-233030-46360.log`) and thousands of due slots (`1,462-4,218` due, `1-8` frames late, `93` passes stopped at their time). - Fix: - Added `texspk_cap_ms(base_cap_ms, vram_budget, room, pressured, catchup_active)` in `crates/victory-gpu/src/draw.rs`: keeps `base_cap_ms` (8 ms) on `<= 12 GiB` cards, full cards (`!room`), or pressured host RAM; doubles the cap (16 ms) when `vram_budget > 12 GiB` and `room` is true; and triples the cap (24 ms, matching the 3x catch-up `span` and `per_frame` byte budget) when `catchup_active` (`on_time >= 1024 && room && !pressured`). - Enabled `VICTORY_TEXTURE_CATCHUP=1` and raised `VICTORY_TEXTURE_STAGE_MS=24` in `apps/victory/src/play.rs`. Safe on 12 GB cards because catch-up only activates when `on_time >= 1024 && room && !pressured`. - Files touched: - `crates/victory-gpu/src/draw.rs` - `apps/victory/src/play.rs` ## Negative Control Before implementing `texspk_cap_ms` scaling: - Command: `cargo test -p victory-gpu --lib texspk_cap_scales_with_vram_and_catchup` - Result: exit 1 (`thread 'draw::tests::texspk_cap_scales_with_vram_and_catchup' panicked at crates\victory-gpu\src\draw.rs:6006:9: assertion 'left == right' failed: left: 8, right: 24`) ## Commands & Checks - `cargo test -p victory-gpu --lib texspk_cap_scales_with_vram_and_catchup`: exit 0 (`1 passed; 0 failed`) - `cargo test -p victory --locked`: exit 0 (`23 passed; 0 failed` unit + `2 passed; 0 failed` integration) - `git diff --check`: exit 0 - `cargo fmt --all -- --check`: exit 1 (pre-existing formatting diffs on `main` `64d4931` in untouched files and untouched lines of `draw.rs` / `play.rs`) - `cargo clippy --workspace --all-targets --locked -- -D warnings`: exit 101 (pre-existing `clippy::precedence` error in `crates/victory-formats/src/texture.rs:1346`) - `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings`: exit 101 (same pre-existing error in `crates/victory-formats/src/texture.rs:1346`) - `cargo test --workspace --locked`: exit 101 (435 passed, 2 pre-existing failures in `crates/victory-gpu/src/indirect.rs`: `host_list_budget_starts_empty_at_each_submission` and `warp_batch_charges_every_execution`) ## Before / After Game Runs - Environment: Windows 11 build 26300, NVIDIA GeForce RTX 5080 (16 GB), driver 616.92 - Command (each run 60 s, release build, `VICTORY_WARMUP_RESTART=0`): `victory.exe play <dump>\game_scarlett_master.exe --set VICTORY_WARMUP_RESTART=0` - Before Run 1 (`victory-nvidia-play-20261128-000026-51684.log`): - Initial 5 s burst: `414.5 fps`, `5 slots, 0 due (oldest 0 frames ago), 0 waiting`, `13 stopped at their time` (next 5 s: `14 stopped at their time`, `0 slots, 0 due`); steady title screen `419.9 fps`. - Before Run 2 (`victory-nvidia-play-20261128-000149-64144.log`): - Steady title screen `430.0 fps`, `0 slots, 0 due (oldest 0 frames ago), 0 waiting`. - After Run 1 (`victory-nvidia-play-20261128-000626-30924.log`): - Initial 5 s burst: `422.1 fps`, `5 slots, 0 due (oldest 0 frames ago), 0 waiting`, `11 stopped at their time` (next 5 s: `7 stopped at their time`, `0 slots, 0 due`, `427.2 fps`). - After Run 2 (`victory-nvidia-play-20261128-000757-40524.log`): - Initial 5 s burst: `429.8 fps`, `0 slots, 0 due (oldest 0 frames ago), 0 waiting`, `5 stopped at their time` (next 5 s: `8 stopped at their time`, `428.1 fps`). ## Hand test in play (reviewer) The runs above never left the title screen, so they say nothing about streaming. The user then played a build of this branch together with #516 (cherry-picked on top, main `64d4931`) on the RTX 5080: open water, the bridge, mangroves, with DLSS frame generation on at times. Window title: 16-18 fps rendered (32 fps with frame generation) at 3900-6250 draws/frame; dedicated card memory peaked at 13.3 of 16 GB. The user called it the best build so far ("the best so far"). That is a subjective comparison, not a measurement, and it does not separate this change from #516. Some rectangular patches on the water, under the bridge, are still visible; those are left for a separate change. ## What Was Not Tested - Unattended 60 s runs stop at the title screen (no controller/keyboard input to press A and enter street gameplay, where `1,462-4,218` due-slot bursts occur); the in-game catch-up path (`on_time >= 1024`) is verified by unit test `texspk_cap_scales_with_vram_and_catchup` and analyzed against `victory-nvidia-play-20261127-233030-46360.log`. AI-assisted. Gemini 4 Hydrogen (Antigravity CLI) wrote the change and ran the checks; Claude Code reviewed it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Machad3x commented 2026-11-28 01:27:42 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Machad3x on 2026-11-28T01:27:42Z.


Tested in a batch on an RTX 3080 Ti + Ryzen 7 5700X, 1440p, DLSS Quality, title ray tracing on (VICTORY_BVH_BUILDER=1), 240 s run into the prison cell scene. Batch: #516, #501, #498, #497, #532, #521.
Result: alive for the whole run, 61.5-63.9 ms/frame, 1 draw/frame dropped (not from this batch), no shader or pipeline refused.
No problem found in this PR.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7231681646 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/532#issuecomment-7231681646). Originally posted by [Machad3x](https://github.com/Machad3x) on 2026-11-28T01:27:42Z. --- Tested in a batch on an RTX 3080 Ti + Ryzen 7 5700X, 1440p, DLSS Quality, title ray tracing on (VICTORY_BVH_BUILDER=1), 240 s run into the prison cell scene. Batch: #516, #501, #498, #497, #532, #521. Result: alive for the whole run, 61.5-63.9 ms/frame, 1 draw/frame dropped (not from this batch), no shader or pipeline refused. No problem found in this PR.
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!532
No description provided.