victory-gpu: require >= 8 GiB dedicated VRAM budget for auto BAR defaults #3791

Closed
superhero-520 wants to merge 1 commit from upstream-pr/3791 into main
superhero-520 commented 2026-11-30 07:18:20 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by superhero-520 on 2026-11-30T07:18:20Z.


Summary

Requires at least 8 GiB of dedicated VRAM budget (residency::card_has_bar_headroom(local_budget)) before automatically routing submission send buffers (VICTORY_SEND_BAR=1) or host windows (VICTORY_WINDOWS_BAR_MB=4096/3072) into CPU-mapped BAR card memory on 16 GB RAM hosts, matching shadow::default_window_card_mb()'s existing < 8 GiB -> 0 MiB floor while preserving the issue #1520 fix on 12+ GiB desktop cards and keeping explicit environment overrides intact.

Root Cause

  • Commits f718ae47 and 158d3177 added residency::shared_is_small() and updated shadow::window_mapped_most() to auto-enable VICTORY_SEND_BAR=1 and VICTORY_WINDOWS_BAR_MB=4096/3072 whenever host RAM is 16 GB (shared_budget < 10 GiB or small_host_ram()), motivated by issue #1520 on a 12 GB desktop RTX 3060 + 16 GB RAM.
  • Neither path checked the GPU's dedicated local VRAM budget, even though shadow::default_window_card_mb() explicitly returns 0 MiB when local VRAM budget is < 8 GiB.
  • On a 6 GiB RTX 3060 Laptop (DXGI local budget ~4.6–5.2 GiB, ReBAR enabled, 16 GB RAM):
    1. Auto VICTORY_SEND_BAR=1 pushed per-frame submission send staging through PCIe BAR, slowing VICTORY_SEND_OWN 3×–4× (6–8 ms -> 22–30 ms/frame), inflating submitting-thread card-copy time 2.5×–9× (10.9–19.1 ms -> 47.3–102.3 ms/frame), and triggering severe hitching (>500 ms spikes).
    2. Auto VICTORY_WINDOWS_BAR_MB=4096 placed ~100–180 MB of BAR windows into already-overcommitted 6 GiB VRAM (5,427 MB vs 5,248 MB in FSR 3 2X) and doubled heap-record sweep time (40.7 ms vs 18.7 ms in FSR 3 2X), hurting 1% Low FPS (0.98 vs 1.94) while saving little shared RAM.

Fix Design (residency.rs, shadow.rs, host/send.rs)

  1. crates/victory-gpu/src/residency.rs:
    • Add pub(crate) fn card_has_bar_headroom(local_budget: u64) -> bool { local_budget >= 8 * GIB }.
    • Gate shared_is_small() via shared_is_small_for(local_budget, shared_budget, mapped) so cards with < 8 GiB local VRAM budget (e.g. 6 GiB and 8 GiB cards with ~5.1–7.1 GiB DXGI budgets) do not auto-enable VICTORY_SEND_BAR=1 or VICTORY_WINDOWS_BAR_MB=4096.
  2. crates/victory-gpu/src/shadow.rs:
    • Gate default_window_mapped_mb()'s 3072 MiB small_host_ram() fallback on card_has_bar_headroom(local_budget).
    • Extract resolve_window_mapped_mb() and window_mapped_fits_budget() so explicit VICTORY_WINDOWS_BAR_MB overrides always win (including 0 on large cards or non-zero on small cards), while automatic BAR window allocations also respect dynamic mid-run DXGI budget drops below 8 GiB.
  3. crates/victory-gpu/src/host/send.rs:
    • Extract on_card_for(env_override, shared_small) so explicit VICTORY_SEND_BAR=0/1 overrides are directly unit-tested alongside shared_is_small().

Verification & Interleaved A/B Hardware Results

Unit Tests

  • cargo test --locked -p victory-gpu --lib residency::tests — PASS (shared_is_small_requires_dedicated_vram_headroom covers 6 / 8 / exact-8 GiB / 12 / 16 / 24 GiB tiers, unknown budget, unmapped card, and 32 GB host RAM).
  • cargo test --locked -p victory-gpu --lib window_tests — PASS (bar_windows_default_stays_off_on_low_vram_cards_and_respects_overrides_and_budget_drops covers all GPU tiers, explicit env overrides, invalid env fallback, and dynamic DXGI budget drop).
  • cargo test --locked -p victory-gpu --lib host::send::tests — PASS (send_bar_respects_explicit_override_and_shared_small_default).
  • cargo clippy --locked -p victory-gpu --all-targets, cargo check --profile diag --locked -p victory --features diagnostics, cargo run --locked -p xtask -- policy --staged — all PASS with 0 new warnings.

Live Interleaved Single-Variable A/B Results

Hardware: RTX 3060 Laptop 6 GiB (ReBAR ON) + Ryzen 7 5800H + 16 GB RAM, Series S 540p -> 1080p DLSS Perf K, RT OFF, warm pipeline library (slow_loads_in_world = 0 except noted), identical scripted route, with GPU power/clock/temperature and DXGI budget logged per run. All arms below ran on the same binary with RemapQueue backoff already applied (plus official v2026.11.29.05 41adb551 as reference in FSR 3 2X):

1. FG OFF — 2 Reversed-Order Interleaved Rounds (canceling thermal/drift bias)

Arm (n=2 paired mean) Avg FPS 1% Low P99 (ms) Submit (ms) SEND_OWN (ms) Peak VRAM / Budget (Over) GPU Power / Clock
SEND_BAR=1, WINDOWS_BAR_MB=4096 (upstream default) 4.46 0.81 920.3 177.0 25.9 5,392 / 4,798 (+595 MB) 54.0 W / 2,018 MHz
SEND_BAR=0, WINDOWS_BAR_MB=4096 5.47 1.04 607.2 141.5 9.1 5,282 / 4,706 (+576 MB) 56.8 W / 2,025 MHz
SEND_BAR=0, WINDOWS_BAR_MB=512 5.38 1.31 644.2 128.6 8.9 5,301 / 4,789 (+512 MB) 55.9 W / 2,036 MHz
SEND_BAR=0, WINDOWS_BAR_MB=0 (this PR default) 5.01* 1.14 603.7 130.0 7.9 5,195 / 4,746 (+450 MB) 56.9 W / 2,041 MHz

*Note: ab1-bar0-r1 experienced a lower WDDM DXGI budget (4,556 MB, +609 MB overcommit) and 1 slow load (max 1,145 ms). Across all 6 non-BAR-send runs, disabling VICTORY_SEND_BAR=1 cut SEND_OWN ~3× and reduced submit time by 35–47 ms/frame; disabling WINDOWS_BAR_MB gave the lowest peak VRAM (5,195 MB) and lowest P99 (603.7 ms).

2. FSR 3 2X — Same-Window Interleaved Comparison (steady DXGI budget 4,925–4,942 MB, 58–59 °C, ~2,011–2,040 MHz)

Arm Avg Base FPS 1% Low 0.1% Low P99 (ms) >500 ms Hitches Submit (ms) SEND_OWN (ms) CardMeter (ms) Peak VRAM / Budget (Over)
Official v2026.11.29.05 (41adb551, BAR auto ON) 4.11 0.55 0.36 767.0 5 160.1 24.0 84.8 5,266 / 4,942 (+324 MB)
SEND_BAR=0, WINDOWS_BAR_MB=4096 5.65 0.98 0.51 520.9 3 119.1 10.4 68.0 5,427 / 4,928 (+499 MB)
SEND_BAR=0, WINDOWS_BAR_MB=512 5.12 1.17 1.02 730.0 8 153.1 12.4 94.3 5,334 / 4,925 (+409 MB)
SEND_BAR=0, WINDOWS_BAR_MB=0 (this PR default) 6.28 (+52.8%) 1.94 (+253%) 1.24 (+244%) 342.0 1 110.8 5.7 59.7 5,248 / 4,939 (+309 MB)
  • Zero OOM, zero device-removed across all runs; FSR 3 2X (fsr_fg_active = true) and audio unaffected.

Limitations & Known Risks

  • This change restores non-BAR upload/window routing on < 8 GiB VRAM cards; it does not by itself close the broader v2026.11.28.03 vs v2026.11.29.05 texture/render-target VRAM budget gap (~4.0 GB vs ~5.2 GB), which is tracked separately.
  • On 8 GiB GPUs paired with 16 GB host RAM where DXGI reports a ~7.1–7.3 GiB local budget, auto BAR defaults will now stay off (users who explicitly want BAR can still set VICTORY_WINDOWS_BAR_MB / VICTORY_SEND_BAR=1).
  • Live tests above are 65 s in-world scripted runs; longer multi-area soak testing does not change the BAR routing decision but is being run separately.

AI Assistance Disclosure

AI-Assisted: Diagnosed, implemented, tested, and benchmarked with AI assistance (Antigravity / Gemini), with all unit tests, clippy/policy checks, and live RTX 3060 interleaved A/B measurements verified locally.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5560829085 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3791). Originally posted by [superhero-520](https://github.com/superhero-520) on 2026-11-30T07:18:20Z. --- ## Summary Requires at least **8 GiB of dedicated VRAM budget** (`residency::card_has_bar_headroom(local_budget)`) before automatically routing submission send buffers (`VICTORY_SEND_BAR=1`) or host windows (`VICTORY_WINDOWS_BAR_MB=4096/3072`) into CPU-mapped BAR card memory on 16 GB RAM hosts, matching `shadow::default_window_card_mb()`'s existing `< 8 GiB -> 0 MiB` floor while preserving the issue #1520 fix on 12+ GiB desktop cards and keeping explicit environment overrides intact. ## Root Cause - Commits `f718ae47` and `158d3177` added `residency::shared_is_small()` and updated `shadow::window_mapped_most()` to auto-enable `VICTORY_SEND_BAR=1` and `VICTORY_WINDOWS_BAR_MB=4096/3072` whenever host RAM is 16 GB (`shared_budget < 10 GiB` or `small_host_ram()`), motivated by issue #1520 on a **12 GB desktop RTX 3060 + 16 GB RAM**. - Neither path checked the GPU's **dedicated local VRAM budget**, even though `shadow::default_window_card_mb()` explicitly returns `0 MiB` when local VRAM budget is `< 8 GiB`. - On a **6 GiB RTX 3060 Laptop** (DXGI local budget `~4.6–5.2 GiB`, ReBAR enabled, 16 GB RAM): 1. Auto `VICTORY_SEND_BAR=1` pushed per-frame submission send staging through PCIe BAR, slowing `VICTORY_SEND_OWN` **3×–4×** (`6–8 ms` -> `22–30 ms/frame`), inflating submitting-thread card-copy time **2.5×–9×** (`10.9–19.1 ms` -> `47.3–102.3 ms/frame`), and triggering severe hitching (>500 ms spikes). 2. Auto `VICTORY_WINDOWS_BAR_MB=4096` placed `~100–180 MB` of BAR windows into already-overcommitted 6 GiB VRAM (`5,427 MB` vs `5,248 MB` in FSR 3 2X) and doubled heap-record sweep time (`40.7 ms` vs `18.7 ms` in FSR 3 2X), hurting 1% Low FPS (`0.98` vs `1.94`) while saving little shared RAM. ## Fix Design (`residency.rs`, `shadow.rs`, `host/send.rs`) 1. **`crates/victory-gpu/src/residency.rs`**: - Add `pub(crate) fn card_has_bar_headroom(local_budget: u64) -> bool { local_budget >= 8 * GIB }`. - Gate `shared_is_small()` via `shared_is_small_for(local_budget, shared_budget, mapped)` so cards with `< 8 GiB` local VRAM budget (e.g. 6 GiB and 8 GiB cards with ~5.1–7.1 GiB DXGI budgets) do not auto-enable `VICTORY_SEND_BAR=1` or `VICTORY_WINDOWS_BAR_MB=4096`. 2. **`crates/victory-gpu/src/shadow.rs`**: - Gate `default_window_mapped_mb()`'s `3072 MiB` `small_host_ram()` fallback on `card_has_bar_headroom(local_budget)`. - Extract `resolve_window_mapped_mb()` and `window_mapped_fits_budget()` so explicit `VICTORY_WINDOWS_BAR_MB` overrides always win (including `0` on large cards or non-zero on small cards), while automatic BAR window allocations also respect dynamic mid-run DXGI budget drops below 8 GiB. 3. **`crates/victory-gpu/src/host/send.rs`**: - Extract `on_card_for(env_override, shared_small)` so explicit `VICTORY_SEND_BAR=0/1` overrides are directly unit-tested alongside `shared_is_small()`. ## Verification & Interleaved A/B Hardware Results ### Unit Tests - `cargo test --locked -p victory-gpu --lib residency::tests` — PASS (`shared_is_small_requires_dedicated_vram_headroom` covers 6 / 8 / exact-8 GiB / 12 / 16 / 24 GiB tiers, unknown budget, unmapped card, and 32 GB host RAM). - `cargo test --locked -p victory-gpu --lib window_tests` — PASS (`bar_windows_default_stays_off_on_low_vram_cards_and_respects_overrides_and_budget_drops` covers all GPU tiers, explicit env overrides, invalid env fallback, and dynamic DXGI budget drop). - `cargo test --locked -p victory-gpu --lib host::send::tests` — PASS (`send_bar_respects_explicit_override_and_shared_small_default`). - `cargo clippy --locked -p victory-gpu --all-targets`, `cargo check --profile diag --locked -p victory --features diagnostics`, `cargo run --locked -p xtask -- policy --staged` — all PASS with 0 new warnings. ### Live Interleaved Single-Variable A/B Results Hardware: RTX 3060 Laptop 6 GiB (ReBAR ON) + Ryzen 7 5800H + 16 GB RAM, Series S 540p -> 1080p DLSS Perf K, RT OFF, warm pipeline library (`slow_loads_in_world = 0` except noted), identical scripted route, with GPU power/clock/temperature and DXGI budget logged per run. All arms below ran on the same binary with `RemapQueue` backoff already applied (plus official `v2026.11.29.05` `41adb551` as reference in FSR 3 2X): #### 1. FG OFF — 2 Reversed-Order Interleaved Rounds (canceling thermal/drift bias) | Arm (n=2 paired mean) | Avg FPS | 1% Low | P99 (ms) | Submit (ms) | `SEND_OWN` (ms) | Peak VRAM / Budget (Over) | GPU Power / Clock | |---|---:|---:|---:|---:|---:|---:|---:| | `SEND_BAR=1, WINDOWS_BAR_MB=4096` (upstream default) | 4.46 | 0.81 | 920.3 | 177.0 | 25.9 | 5,392 / 4,798 (**+595 MB**) | 54.0 W / 2,018 MHz | | `SEND_BAR=0, WINDOWS_BAR_MB=4096` | 5.47 | 1.04 | 607.2 | 141.5 | 9.1 | 5,282 / 4,706 (+576 MB) | 56.8 W / 2,025 MHz | | `SEND_BAR=0, WINDOWS_BAR_MB=512` | 5.38 | 1.31 | 644.2 | 128.6 | 8.9 | 5,301 / 4,789 (+512 MB) | 55.9 W / 2,036 MHz | | `SEND_BAR=0, WINDOWS_BAR_MB=0` (this PR default) | 5.01* | 1.14 | **603.7** | **130.0** | **7.9** | **5,195 / 4,746 (+450 MB)** | 56.9 W / 2,041 MHz | *\*Note: `ab1-bar0-r1` experienced a lower WDDM DXGI budget (`4,556 MB`, `+609 MB` overcommit) and 1 `slow load` (`max 1,145 ms`). Across all 6 non-BAR-send runs, disabling `VICTORY_SEND_BAR=1` cut `SEND_OWN` ~3× and reduced submit time by 35–47 ms/frame; disabling `WINDOWS_BAR_MB` gave the lowest peak VRAM (`5,195 MB`) and lowest P99 (`603.7 ms`).* #### 2. FSR 3 2X — Same-Window Interleaved Comparison (steady DXGI budget `4,925–4,942 MB`, `58–59 °C`, `~2,011–2,040 MHz`) | Arm | Avg Base FPS | 1% Low | 0.1% Low | P99 (ms) | >500 ms Hitches | Submit (ms) | `SEND_OWN` (ms) | CardMeter (ms) | Peak VRAM / Budget (Over) | |---|---:|---:|---:|---:|---:|---:|---:|---:|---:| | Official `v2026.11.29.05` (`41adb551`, BAR auto ON) | 4.11 | 0.55 | 0.36 | 767.0 | 5 | 160.1 | 24.0 | 84.8 | 5,266 / 4,942 (+324 MB) | | `SEND_BAR=0, WINDOWS_BAR_MB=4096` | 5.65 | 0.98 | 0.51 | 520.9 | 3 | 119.1 | 10.4 | 68.0 | 5,427 / 4,928 (**+499 MB**) | | `SEND_BAR=0, WINDOWS_BAR_MB=512` | 5.12 | 1.17 | 1.02 | 730.0 | 8 | 153.1 | 12.4 | 94.3 | 5,334 / 4,925 (+409 MB) | | **`SEND_BAR=0, WINDOWS_BAR_MB=0` (this PR default)** | **6.28 (+52.8%)** | **1.94 (+253%)** | **1.24 (+244%)** | **342.0** | **1** | **110.8** | **5.7** | **59.7** | **5,248 / 4,939 (+309 MB)** | - Zero OOM, zero device-removed across all runs; FSR 3 2X (`fsr_fg_active = true`) and audio unaffected. ## Limitations & Known Risks - This change restores non-BAR upload/window routing on `< 8 GiB` VRAM cards; it does **not** by itself close the broader `v2026.11.28.03` vs `v2026.11.29.05` texture/render-target VRAM budget gap (`~4.0 GB` vs `~5.2 GB`), which is tracked separately. - On 8 GiB GPUs paired with 16 GB host RAM where DXGI reports a `~7.1–7.3 GiB` local budget, auto BAR defaults will now stay off (users who explicitly want BAR can still set `VICTORY_WINDOWS_BAR_MB` / `VICTORY_SEND_BAR=1`). - Live tests above are 65 s in-world scripted runs; longer multi-area soak testing does not change the BAR routing decision but is being run separately. ## AI Assistance Disclosure AI-Assisted: Diagnosed, implemented, tested, and benchmarked with AI assistance (Antigravity / Gemini), with all unit tests, clippy/policy checks, and live RTX 3060 interleaved A/B measurements verified locally.
tyr0nsur commented 2026-11-30 07:31:53 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tyr0nsur on 2026-11-30T07:31:53Z.


One edge case on b7159a1: after auto BAR windows are enabled, window_mapped_for skips the live allocation guard if host.video_memory() returns None. A failed DXGI sample can therefore admit another auto BAR window without proving it fits. Main already bypasses the check on an unavailable sample. With the new policy, I'd make the automatic path wait for a valid sample and keep the existing explicit-override behavior.

Cherry-pickable 31cb51e exercises the same admission logic with a good sample, then no sample, then recovery. The missing-sample assertion failed with the original semantics and passes with the fix. The patch also restores lazy evaluation of the automatic send default when VICTORY_SEND_BAR is set, matching main. Windows results were 22 window, 4 send and 8 residency unit tests passed, plus the staged asset policy check.

Anonymized 8 GiB data point for the threshold: two existing .05 runs on RTX 4060 + 32 GB RAM had a DXGI local budget of 6,428–7,189 MiB across 2,168 memory samples, with zero occurrences of the auto-BAR activation message. This is evidence for the budget range only. The patch was unit-tested with Codex assistance and I have no in-game A/B result for it.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7271836588 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3791#issuecomment-7271836588). Originally posted by [tyr0nsur](https://github.com/tyr0nsur) on 2026-11-30T07:31:53Z. --- One edge case on `b7159a1`: after auto BAR windows are enabled, `window_mapped_for` skips the live allocation guard if `host.video_memory()` returns `None`. A failed DXGI sample can therefore admit another auto BAR window without proving it fits. Main already bypasses the check on an unavailable sample. With the new policy, I'd make the automatic path wait for a valid sample and keep the existing explicit-override behavior. [Cherry-pickable `31cb51e`](https://github.com/tyr0nsur/VIctory-NVIDIA/commit/31cb51ef2bc1fa2829ef1b9836cbced6d710f33c) exercises the same admission logic with a good sample, then no sample, then recovery. The missing-sample assertion failed with the original semantics and passes with the fix. The patch also restores lazy evaluation of the automatic send default when `VICTORY_SEND_BAR` is set, matching main. Windows results were 22 window, 4 send and 8 residency unit tests passed, plus the staged asset policy check. Anonymized 8 GiB data point for the threshold: two existing `.05` runs on RTX 4060 + 32 GB RAM had a DXGI local budget of 6,428–7,189 MiB across 2,168 memory samples, with zero occurrences of the auto-BAR activation message. This is evidence for the budget range only. The patch was unit-tested with Codex assistance and I have no in-game A/B result for it.
andrewpozdnakov7-jpg commented 2026-11-30 13:43:38 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-11-30T13:43:38Z.


#3965's RTX 3070 trace pair gives an in-range test case for the new threshold. The two .05 replays reported local DXGI budgets of 7,167–7,249 MiB. I parsed both logs. The median across logged samples with at least 5,000 draws rose from 11.3 to 12.3 FPS when the tester changed only the send default in source. In the 8,000–8,999-draw bucket the median preparation time went from 57.0 to 46.0 ms and FPS from 11.7 to 12.6 (19 and 16 samples). Both logs have zero driver OOM refusal entries. The replays diverge in draw counts, so the measurements describe those two runs.

I reapplied b7159a1 and @tyr0nsur's 31cb51e to release 41adb551, preserving both Git authors in this review branch. I fed the normal send and window configurations synthetic DXGI samples matching the observed budget range, with small shared memory and CPU-mappable card memory.

Configuration at 7,167 MiB local BAR send BAR window limit
Release defaults on 4,096 MiB
Release with VICTORY_SEND_BAR=0 off 4,096 MiB
Review branch defaults off 0
Review branch with VICTORY_WINDOWS_BAR_MB=4096 off 4,096 MiB

The same outcomes held at 7,249 MiB for defaults. The review branch turns both auto paths back on at 8,192 MiB and honors explicit send and window overrides below it. Its automatic window allocation also waits for the DXGI sample to recover if it is temporarily unavailable. All 34 send, window and residency unit tests passed, with one existing test ignored. All three outgoing source files passed the staged asset-policy check.

@danielvv88 the measured win in your traces isolates the send change. Could you compare the review branch with VICTORY_WINDOWS_BAR_MB=4096 and with that same setting unset, keeping the other settings and checkpoint matched? Both runs should use the automatic send policy. That compares the window behavior independently on your RTX 3070. Please preserve the original Git authors if taking these commits.

Release update. v2026.11.30.01 now ships 1a4c66ca, which makes BAR sends opt-in. The review branch above captures the earlier .29.05 comparison. For a current-release window A/B, keep VICTORY_SEND_BAR unset and compare VICTORY_WINDOWS_BAR_MB=4096 and =0 on stock .30.01. That isolates the windows with the shipped send default. Update in #3965.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7280264337 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3791#issuecomment-7280264337). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-30T13:43:38Z. --- [#3965's RTX 3070 trace pair](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3965#issuecomment-7279721245) gives an in-range test case for the new threshold. The two `.05` replays reported local DXGI budgets of 7,167–7,249 MiB. I parsed both logs. The median across logged samples with at least 5,000 draws rose from 11.3 to 12.3 FPS when the tester changed only the send default in source. In the 8,000–8,999-draw bucket the median preparation time went from 57.0 to 46.0 ms and FPS from 11.7 to 12.6 (19 and 16 samples). Both logs have zero driver OOM refusal entries. The replays diverge in draw counts, so the measurements describe those two runs. I reapplied `b7159a1` and @tyr0nsur's [`31cb51e`](https://github.com/tyr0nsur/VIctory-NVIDIA/commit/31cb51ef2bc1fa2829ef1b9836cbced6d710f33c) to release `41adb551`, preserving both Git authors in [this review branch](https://github.com/andrewpozdnakov7-jpg/VIctory-NVIDIA/tree/review/3791-bar-live-budget). I fed the normal send and window configurations synthetic DXGI samples matching the observed budget range, with small shared memory and CPU-mappable card memory. | Configuration at 7,167 MiB local | BAR send | BAR window limit | | --- | --- | ---: | | Release defaults | on | 4,096 MiB | | Release with `VICTORY_SEND_BAR=0` | off | 4,096 MiB | | Review branch defaults | off | 0 | | Review branch with `VICTORY_WINDOWS_BAR_MB=4096` | off | 4,096 MiB | The same outcomes held at 7,249 MiB for defaults. The review branch turns both auto paths back on at 8,192 MiB and honors explicit send and window overrides below it. Its automatic window allocation also waits for the DXGI sample to recover if it is temporarily unavailable. All 34 send, window and residency unit tests passed, with one existing test ignored. All three outgoing source files passed the staged asset-policy check. @danielvv88 the measured win in your traces isolates the send change. Could you compare the review branch with `VICTORY_WINDOWS_BAR_MB=4096` and with that same setting unset, keeping the other settings and checkpoint matched? Both runs should use the automatic send policy. That compares the window behavior independently on your RTX 3070. Please preserve the original Git authors if taking these commits. Release update. [v2026.11.30.01](https://github.com/trustno1-coder/VIctory-NVIDIA/releases/tag/v2026.11.30.01) now ships [`1a4c66ca`](https://github.com/trustno1-coder/VIctory-NVIDIA/commit/1a4c66ca49eb965e35599d3f6ed08557d238aa9b), which makes BAR sends opt-in. The review branch above captures the earlier .29.05 comparison. For a current-release window A/B, keep `VICTORY_SEND_BAR` unset and compare `VICTORY_WINDOWS_BAR_MB=4096` and `=0` on stock .30.01. That isolates the windows with the shipped send default. [Update in #3965](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3965#issuecomment-7281444680).
danielvv88 commented 2026-11-30 14:04:27 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by danielvv88 on 2026-11-30T14:04:27Z.


Data point from an 8 GB card that this threshold would catch: RTX 3070 8 GB (DXGI local budget ~7.0 GiB), ReBAR on, 16 GB RAM, Ryzen 5 5600, v2026.11.29.05, same controller tape replayed (VICTORY_INPUT_REPLAY), details in #3965.

standing, median fps driving, median fps
default (SEND_BAR auto-on, WINDOWS_BAR_MB 4096) 11.9 / 11.8 11.9 / 12.4
SEND_BAR=0, WINDOWS_BAR_MB 4096 12.9 / 12.7 12.3 / 14.2
SEND_BAR=0, WINDOWS_BAR_MB=0 (this PR's default here) 10.4 6.6

So SEND_BAR off agrees with your results, but turning the BAR windows off costs about half the driving frame rate on this card (single run, but a large gap). WINDOWS_BAR_MB 3072 and 2048 were also worse than 4096. Could the window gate use a lower floor (e.g. ~6.5 GiB budget) or stay separate from the SEND_BAR gate?

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7280792669 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3791#issuecomment-7280792669). Originally posted by [danielvv88](https://github.com/danielvv88) on 2026-11-30T14:04:27Z. --- Data point from an 8 GB card that this threshold would catch: RTX 3070 8 GB (DXGI local budget ~7.0 GiB), ReBAR on, 16 GB RAM, Ryzen 5 5600, v2026.11.29.05, same controller tape replayed (VICTORY_INPUT_REPLAY), details in #3965. | | standing, median fps | driving, median fps | |---|---|---| | default (SEND_BAR auto-on, WINDOWS_BAR_MB 4096) | 11.9 / 11.8 | 11.9 / 12.4 | | SEND_BAR=0, WINDOWS_BAR_MB 4096 | 12.9 / 12.7 | 12.3 / 14.2 | | SEND_BAR=0, WINDOWS_BAR_MB=0 (this PR's default here) | 10.4 | 6.6 | So SEND_BAR off agrees with your results, but turning the BAR windows off costs about half the driving frame rate on this card (single run, but a large gap). WINDOWS_BAR_MB 3072 and 2048 were also worse than 4096. Could the window gate use a lower floor (e.g. ~6.5 GiB budget) or stay separate from the SEND_BAR gate?
andrewpozdnakov7-jpg commented 2026-12-01 11:23:14 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-12-01T11:23:14Z.


I’d keep VICTORY_SEND_BAR and VICTORY_WINDOWS_BAR_MB independent for now. With BAR sends off on the RTX 3070, the single run with windows disabled gave 6.6 FPS while driving, compared with 12.3 and 14.2 FPS with 4,096 MiB of windows. I’d repeat that comparison on the same route with VICTORY_SEND_BAR=0 before choosing a new window threshold.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7309568943 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3791#issuecomment-7309568943). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-12-01T11:23:14Z. --- I’d keep `VICTORY_SEND_BAR` and `VICTORY_WINDOWS_BAR_MB` independent for now. With BAR sends off on the RTX 3070, the single run with windows disabled gave 6.6 FPS while driving, compared with 12.3 and 14.2 FPS with 4,096 MiB of windows. I’d repeat that comparison on the same route with `VICTORY_SEND_BAR=0` before choosing a new window threshold.
danielvv88 commented 2026-12-01 12:34:38 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by danielvv88 on 2026-12-01T12:34:38Z.


Ich würde behalten VICTORY_SEND_BARund VICTORY_WINDOWS_BAR_MBVorerst unabhängig. Mit BAR-Aussendungen auf der RTX 3070 gab der Single Run mit deaktivierten Fenstern 6,6 FPS während der Fahrt, verglichen mit 12,3 und 14,2 FPS mit 4.096 MiB Fenstern. Ich würde diesen Vergleich auf der gleichen Route wiederholen mit VICTORY_SEND_BAR=0bevor Sie eine neue Fensterschwelle auswählen.

Good point, and one correction first: the 6.6 fps row was already with VICTORY_SEND_BAR=0. The three rows were: default (SEND_BAR auto-on, WINDOWS_BAR_MB 4096), SEND_BAR=0 with WINDOWS_BAR_MB 4096, and SEND_BAR=0 with WINDOWS_BAR_MB=0. But it was a single run, on 16 GB RAM.

This PC now has 32 GB, where the automatic default gives 0 MB of windows on an 8 GB card, so the question matters here again. I'm running the windows comparison now (WINDOWS_BAR_MB 0 vs 4096, SEND_BAR off as in the current defaults, same driving route, ~10 minutes each) and will post both runs here with the numbers and logs.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7311340398 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3791#issuecomment-7311340398). Originally posted by [danielvv88](https://github.com/danielvv88) on 2026-12-01T12:34:38Z. --- > Ich würde behalten `VICTORY_SEND_BAR`und `VICTORY_WINDOWS_BAR_MB`Vorerst unabhängig. Mit BAR-Aussendungen auf der RTX 3070 gab der Single Run mit deaktivierten Fenstern 6,6 FPS während der Fahrt, verglichen mit 12,3 und 14,2 FPS mit 4.096 MiB Fenstern. Ich würde diesen Vergleich auf der gleichen Route wiederholen mit `VICTORY_SEND_BAR=0`bevor Sie eine neue Fensterschwelle auswählen. Good point, and one correction first: the 6.6 fps row was already with VICTORY_SEND_BAR=0. The three rows were: default (SEND_BAR auto-on, WINDOWS_BAR_MB 4096), SEND_BAR=0 with WINDOWS_BAR_MB 4096, and SEND_BAR=0 with WINDOWS_BAR_MB=0. But it was a single run, on 16 GB RAM. This PC now has 32 GB, where the automatic default gives 0 MB of windows on an 8 GB card, so the question matters here again. I'm running the windows comparison now (WINDOWS_BAR_MB 0 vs 4096, SEND_BAR off as in the current defaults, same driving route, ~10 minutes each) and will post both runs here with the numbers and logs.
danielvv88 commented 2026-12-01 13:12:54 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by danielvv88 on 2026-12-01T13:12:54Z.


Ich würde behalten VICTORY_SEND_BARund VICTORY_WINDOWS_BAR_MBVorerst unabhängig. Mit BAR-Aussendungen auf der RTX 3070 gab der Single Run mit deaktivierten Fenstern 6,6 FPS während der Fahrt, verglichen mit 12,3 und 14,2 FPS mit 4.096 MiB Fenstern. Ich würde diesen Vergleich auf der gleichen Route wiederholen mit VICTORY_SEND_BAR=0bevor Sie eine neue Fensterschwelle auswählen.

Repeated on the same PC with 32 GB RAM now (RTX 3070 8 GB, Ryzen 5 5600, Series S, DLSS Performance, own build of v2026.11.30.03 with SUBMIT_SPLIT=0, SEND_BAR off as in the defaults). Same driving route, ~10 minutes each, only VICTORY_WINDOWS_BAR_MB changed. Logs in victory-logs-windows-32gb.zip.

driving, ms/frame 2.5-4.5k draws 4.5-6.5k 6.5-8.5k
WINDOWS_BAR_MB=4096 52.3 70.8 80.3
automatic (0 MB on 32 GB + 8 GB card) 54.2 69.1 79.8

No frame under 6 fps and 0 memory errors in either run. The card's own memory was over its budget in 84 % of the samples with 4096 MB of windows and in 0 % without them (shared 5.7 vs 6.3 GB).

So on 32 GB the windows make no measurable difference, and the automatic default (none on an 8 GB card) is the safer one. The 6.6 fps run on 16 GB was most likely the full RAM, not the windows alone. For 16 GB hosts I would keep the current small-host default (4096); I have no new 16 GB runs to say more.
victory-logs-windows-32gb.zip

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7312275116 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3791#issuecomment-7312275116). Originally posted by [danielvv88](https://github.com/danielvv88) on 2026-12-01T13:12:54Z. --- > Ich würde behalten `VICTORY_SEND_BAR`und `VICTORY_WINDOWS_BAR_MB`Vorerst unabhängig. Mit BAR-Aussendungen auf der RTX 3070 gab der Single Run mit deaktivierten Fenstern 6,6 FPS während der Fahrt, verglichen mit 12,3 und 14,2 FPS mit 4.096 MiB Fenstern. Ich würde diesen Vergleich auf der gleichen Route wiederholen mit `VICTORY_SEND_BAR=0`bevor Sie eine neue Fensterschwelle auswählen. Repeated on the same PC with 32 GB RAM now (RTX 3070 8 GB, Ryzen 5 5600, Series S, DLSS Performance, own build of v2026.11.30.03 with SUBMIT_SPLIT=0, SEND_BAR off as in the defaults). Same driving route, ~10 minutes each, only VICTORY_WINDOWS_BAR_MB changed. Logs in victory-logs-windows-32gb.zip. | driving, ms/frame | 2.5-4.5k draws | 4.5-6.5k | 6.5-8.5k | |---|---|---|---| | WINDOWS_BAR_MB=4096 | 52.3 | 70.8 | 80.3 | | automatic (0 MB on 32 GB + 8 GB card) | 54.2 | 69.1 | 79.8 | No frame under 6 fps and 0 memory errors in either run. The card's own memory was over its budget in 84 % of the samples with 4096 MB of windows and in 0 % without them (shared 5.7 vs 6.3 GB). So on 32 GB the windows make no measurable difference, and the automatic default (none on an 8 GB card) is the safer one. The 6.6 fps run on 16 GB was most likely the full RAM, not the windows alone. For 16 GB hosts I would keep the current small-host default (4096); I have no new 16 GB runs to say more. [victory-logs-windows-32gb.zip](https://github.com/user-attachments/files/35684026/victory-logs-windows-32gb.zip)
trustno1-coder commented 2026-12-01 18:48:43 +00:00 (Migrated from github.com)

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


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:7321590987 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3791#issuecomment-7321590987). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-12-01T18:48:43Z. --- 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!3791
No description provided.