shadow, play: keep snapshots cached by default and align launcher defaults #175

Manually merged
github merged 1 commit from gh-pr/175/head into gh-pr/175/base 2026-12-01 20:15:33 +00:00
Owner

@⁠Androtim on GitHub · 2026-11-30 00:22 UTC · original
Androtim:feat/iter172-copyback-cache-and-play-defaults → main · +72 −38 · 3 files · 1 commits · merged 2026-11-30 09:34 UTC

Summary

Restores L2/L3 cache locality for shadow snapshot readbacks and cleans up regressed launcher defaults:

  1. Keep snapshot copies cached by default (crates/victory-gpu/src/shadow.rs):

    • Gates AVX2 non-temporal snapshot stores (copy_snapshot_avx2 / _mm256_stream_si256) behind opt-in VICTORY_RYZEN_PREP=1 on large snapshot batches (>= 10 MiB), and keeps refresh copies (copy_all) and default snapshots on ordinary cached copy_nonoverlapping.
    • Avoids evicting snapshot lines from L2/L3 right before find_all and copy_back_with inspect them.
    • Expands snapshot_copy_tests to cover both default cached and streaming opt-in paths.
  2. Launcher defaults & kept environment variables (apps/victory/src/play.rs, scripts/verify-world.ps1):

    • Drops VICTORY_CARD_AWAKE=1 (removes inter-submission compute wake-up overhead) and VICTORY_AMBIENT_SPECULAR=1 (avoids stand-in reflection color artifacts; still toggleable via F1 REFLECTION ESTIMATE).
    • Restores VICTORY_TEXTURE_CATCHUP=1 and VICTORY_TEXTURE_STAGE_MS=24 for >=12 GB cards and Series S, while keeping 0 / 16 on low-VRAM Series X (1440p) so 8 GB cards avoid boot-time texture pool overshoots.
    • Adds VICTORY_HOME and VICTORY_ADAPTER to KEPT so restarts from F1 or preloading preserve custom home directories and GPU selection.
    • Adds unit test assertions covering the updated defaults and KEPT entries.

Verification

  • Policy & Static Checks:
    • cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy: asset policy: 311 files ok
    • cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu shadow::: pass
    • cargo +1.98.1-x86_64-pc-windows-gnu test -p victory play::: pass
    • cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings: pass
    • cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features diagnostics -- -D warnings: pass
  • Live GPU Verification (RTX 4060 Ti 8 GB, --release --features diagnostics, DLSS quality, 75s in-world off origin/main 64 MiB blocks, D:\victory-data\cache-minivi-pr165):
    • Series S (LowVram): 12.7 fps median (79.0 ms, preparing=35.7 ms, copyback=12.5 ms, vs 8.95 fps origin/main baseline and 9.0 fps in pr171-codetable-s-warm), mapped_rate=8.48 ms/s, over=0 MB (6756 / 6869 MB), 61,907 textures uploaded, 20/24 lit (luma=104.89, edge_energy=7.19, magenta=0.0%), ambient_specular_active=false, crashes=0.
    • Series X (1440p, PlayParity, LowVram): 10.9 fps median (91.7 ms, preparing=39.3 ms, GPU=3.1 ms, copyback=15.5 ms, vs 10.6 fps / 15.8 ms on pr170-v2-x), mapped_rate=12.35 ms/s, 18/24 lit (luma=105.16, edge_energy=7.54, magenta=0.0%), ambient_specular_active=false, crashes=0. (Note: used_max=7090 MB / over=211 MB here is due to origin/main still using 52 x 64 MiB texture blocks with 560 MB fragmented free space prior to merging PR #171's 16 MiB blocks + sparse drain.)
**@⁠Androtim** on GitHub · 2026-11-30 00:22 UTC · [original](https://github.com/Androtim/MiniVI/pull/175) `Androtim:feat/iter172-copyback-cache-and-play-defaults` → `main` · +72 −38 · 3 files · 1 commits · merged 2026-11-30 09:34 UTC ### Summary Restores L2/L3 cache locality for shadow snapshot readbacks and cleans up regressed launcher defaults: 1. **Keep snapshot copies cached by default (`crates/victory-gpu/src/shadow.rs`):** - Gates AVX2 non-temporal snapshot stores (`copy_snapshot_avx2` / `_mm256_stream_si256`) behind opt-in `VICTORY_RYZEN_PREP=1` on large snapshot batches (`>= 10 MiB`), and keeps refresh copies (`copy_all`) and default snapshots on ordinary cached `copy_nonoverlapping`. - Avoids evicting snapshot lines from L2/L3 right before `find_all` and `copy_back_with` inspect them. - Expands `snapshot_copy_tests` to cover both default cached and streaming opt-in paths. 2. **Launcher defaults & kept environment variables (`apps/victory/src/play.rs`, `scripts/verify-world.ps1`):** - Drops `VICTORY_CARD_AWAKE=1` (removes inter-submission compute wake-up overhead) and `VICTORY_AMBIENT_SPECULAR=1` (avoids stand-in reflection color artifacts; still toggleable via F1 `REFLECTION ESTIMATE`). - Restores `VICTORY_TEXTURE_CATCHUP=1` and `VICTORY_TEXTURE_STAGE_MS=24` for >=12 GB cards and Series S, while keeping `0` / `16` on low-VRAM Series X (`1440p`) so 8 GB cards avoid boot-time texture pool overshoots. - Adds `VICTORY_HOME` and `VICTORY_ADAPTER` to `KEPT` so restarts from F1 or preloading preserve custom home directories and GPU selection. - Adds unit test assertions covering the updated defaults and `KEPT` entries. ### Verification - **Policy & Static Checks:** - `cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy`: `asset policy: 311 files ok` - `cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu shadow::`: pass - `cargo +1.98.1-x86_64-pc-windows-gnu test -p victory play::`: pass - `cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings`: pass - `cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features diagnostics -- -D warnings`: pass - **Live GPU Verification (`RTX 4060 Ti 8 GB`, `--release --features diagnostics`, `DLSS quality`, `75s` in-world off `origin/main` `64 MiB` blocks, `D:\victory-data\cache-minivi-pr165`):** - **Series S (`LowVram`):** **`12.7 fps`** median (`79.0 ms`, `preparing=35.7 ms`, `copyback=12.5 ms`, vs `8.95 fps` `origin/main` baseline and `9.0 fps` in `pr171-codetable-s-warm`), `mapped_rate=8.48 ms/s`, `over=0 MB` (`6756 / 6869 MB`), `61,907` textures uploaded, `20/24` lit (`luma=104.89`, `edge_energy=7.19`, `magenta=0.0%`), `ambient_specular_active=false`, `crashes=0`. - **Series X (`1440p`, `PlayParity`, `LowVram`):** **`10.9 fps`** median (`91.7 ms`, `preparing=39.3 ms`, `GPU=3.1 ms`, `copyback=15.5 ms`, vs `10.6 fps / 15.8 ms` on `pr170-v2-x`), `mapped_rate=12.35 ms/s`, `18/24` lit (`luma=105.16`, `edge_energy=7.54`, `magenta=0.0%`), `ambient_specular_active=false`, `crashes=0`. *(Note: `used_max=7090 MB / over=211 MB` here is due to `origin/main` still using 52 x `64 MiB` texture blocks with `560 MB` fragmented free space prior to merging PR #171's 16 MiB blocks + sparse drain.)*
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 20:15:30 +00:00
github manually merged commit 8028baac74 into gh-pr/175/base 2026-12-01 20:15:33 +00:00
Author
Owner

@⁠Androtim on GitHub · 2026-11-30 01:03 UTC · original

Automated triage for the maintainers (not an approval).

Verdict: needs-gpu-test · CI (check): passing

Automated Review Summary

Verdict: needs-gpu-test (CI is passing; logic, safety, and unit tests look solid, and the PR modifies GPU shadow snapshot copy behavior and launcher defaults that warrant a local real-GPU smoke test before merging.)

What was checked

  • crates/victory-gpu/src/shadow.rs:
    • copy_all now passes stream = false to copy_jobs, keeping host refresh copies on ordinary cached copy_nonoverlapping.
    • take_snapshots gates AVX2 non-temporal stores (copy_snapshot_avx2) behind crate::asked_for!("VICTORY_RYZEN_PREP") and a batch threshold of >= 10 << 20 (10 MiB) on x86_64 (defaulting to false elsewhere), keeping snapshot lines in L2/L3 for subsequent find_all / copy_back_with reads.
    • copy_snapshot checks stream && len >= 64 * 1024 && std::arch::is_x86_feature_detected!("avx2") before invoking copy_snapshot_avx2, and snapshot_copy_tests now exercises both stream = false and stream = true with alignment and canary checks.
  • apps/victory/src/play.rs:
    • SETTINGS drops VICTORY_CARD_AWAKE=1 and VICTORY_AMBIENT_SPECULAR=1, and updates VICTORY_TEXTURE_CATCHUP to 1 and VICTORY_TEXTURE_STAGE_MS to 24.
    • settings_with_vram keeps VICTORY_TEXTURE_CATCHUP=0 and VICTORY_TEXTURE_STAGE_MS=16 when low_vram && !series_s, placed before menu and o.more (--set) overrides so user overrides still win.
    • KEPT adds VICTORY_HOME and VICTORY_ADAPTER so menu restarts preserve them.
    • Unit tests (a_plain_start_is_the_launchers, low_vram_series_x_sets_headroom_and_eviction_guards, low_vram_series_s_keeps_native_mips_and_bounds_rt_caps, high_vram_keeps_stock_defaults) verify the new defaults and KEPT entries.
  • scripts/verify-world.ps1:
    • Mirrors the SETTINGS updates and adds the $LowVram -and $Console -eq 'series-x' guard for VICTORY_TEXTURE_CATCHUP=0 / VICTORY_TEXTURE_STAGE_MS=16. No suspicious script changes observed.

Local GPU Verification Needed

  • Run scripts/verify-world.ps1 (or victory play) on both Series S and Series X (1440p) profiles, including an 8 GiB low-VRAM configuration, to verify frame pacing (copyback/preparing), VRAM headroom under VICTORY_TEXTURE_CATCHUP, visual quality with VICTORY_AMBIENT_SPECULAR off by default, and optional VICTORY_RYZEN_PREP=1 stability.

Generated with Antigravity CLI (agy).

**@⁠Androtim** on GitHub · 2026-11-30 01:03 UTC · [original](https://github.com/Androtim/MiniVI/pull/175#issuecomment-7265802427) <!-- minivi-triage v1 head=8028baac74729523e36697523b378053b28feb15 verdict=needs-gpu-test ci=passing at=2026-11-30T01:03:54Z --> Automated triage for the maintainers (not an approval). **Verdict:** `needs-gpu-test` · **CI (`check`):** `passing` ### Automated Review Summary **Verdict:** `needs-gpu-test` (CI is passing; logic, safety, and unit tests look solid, and the PR modifies GPU shadow snapshot copy behavior and launcher defaults that warrant a local real-GPU smoke test before merging.) #### What was checked - **`crates/victory-gpu/src/shadow.rs`:** - `copy_all` now passes `stream = false` to `copy_jobs`, keeping host refresh copies on ordinary cached `copy_nonoverlapping`. - `take_snapshots` gates AVX2 non-temporal stores (`copy_snapshot_avx2`) behind `crate::asked_for!("VICTORY_RYZEN_PREP")` and a batch threshold of `>= 10 << 20` (10 MiB) on `x86_64` (defaulting to `false` elsewhere), keeping snapshot lines in L2/L3 for subsequent `find_all` / `copy_back_with` reads. - `copy_snapshot` checks `stream && len >= 64 * 1024 && std::arch::is_x86_feature_detected!("avx2")` before invoking `copy_snapshot_avx2`, and `snapshot_copy_tests` now exercises both `stream = false` and `stream = true` with alignment and canary checks. - **`apps/victory/src/play.rs`:** - `SETTINGS` drops `VICTORY_CARD_AWAKE=1` and `VICTORY_AMBIENT_SPECULAR=1`, and updates `VICTORY_TEXTURE_CATCHUP` to `1` and `VICTORY_TEXTURE_STAGE_MS` to `24`. - `settings_with_vram` keeps `VICTORY_TEXTURE_CATCHUP=0` and `VICTORY_TEXTURE_STAGE_MS=16` when `low_vram && !series_s`, placed before `menu` and `o.more` (`--set`) overrides so user overrides still win. - `KEPT` adds `VICTORY_HOME` and `VICTORY_ADAPTER` so menu restarts preserve them. - Unit tests (`a_plain_start_is_the_launchers`, `low_vram_series_x_sets_headroom_and_eviction_guards`, `low_vram_series_s_keeps_native_mips_and_bounds_rt_caps`, `high_vram_keeps_stock_defaults`) verify the new defaults and `KEPT` entries. - **`scripts/verify-world.ps1`:** - Mirrors the `SETTINGS` updates and adds the `$LowVram -and $Console -eq 'series-x'` guard for `VICTORY_TEXTURE_CATCHUP=0` / `VICTORY_TEXTURE_STAGE_MS=16`. No suspicious script changes observed. #### Local GPU Verification Needed - Run `scripts/verify-world.ps1` (or `victory play`) on both Series S and Series X (`1440p`) profiles, including an 8 GiB low-VRAM configuration, to verify frame pacing (`copyback`/`preparing`), VRAM headroom under `VICTORY_TEXTURE_CATCHUP`, visual quality with `VICTORY_AMBIENT_SPECULAR` off by default, and optional `VICTORY_RYZEN_PREP=1` stability. --- _Generated with Antigravity CLI (`agy`)._
Author
Owner

@⁠Androtim on GitHub · 2026-11-30 09:34 UTC · original

Hardware-verified on RTX 4060 Ti 8 GB (Series X 1440p -PlayParity, warm shader cache, Wave 7B-1a: #175, #198 on Wave 7A main):

  • FPS: 5.7 fps (vs 5.55 fps Wave 7A) | Draws: 11600 | Crashes/DRED: 0
  • VRAM: 6635 / 6811 MB (over=0 MB, PASS budget gate, -762 MB vs 7397 MB) | Pipeline drops: 266 (vs 288)
  • Visuals: clean lit golden stairs, deck, and spotless Jason (luma=101.15, edge_energy=16.68, magenta=0.0%), 0 failed bakes

Merging onto main.

**@⁠Androtim** on GitHub · 2026-11-30 09:34 UTC · [original](https://github.com/Androtim/MiniVI/pull/175#issuecomment-7274398706) Hardware-verified on RTX 4060 Ti 8 GB (Series X 1440p `-PlayParity`, warm shader cache, Wave 7B-1a: `#175, #198` on Wave 7A `main`): - **FPS:** `5.7 fps` (vs `5.55 fps` Wave 7A) | **Draws:** `11600` | **Crashes/DRED:** `0` - **VRAM:** `6635 / 6811 MB` (`over=0 MB`, PASS budget gate, `-762 MB` vs `7397 MB`) | **Pipeline drops:** `266` (vs `288`) - **Visuals:** clean lit golden stairs, deck, and spotless Jason (`luma=101.15`, `edge_energy=16.68`, `magenta=0.0%`), `0` failed bakes Merging onto `main`.
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Androtim--MiniVI!175
No description provided.