watch: enable lock-free write-fault opening (VICTORY_FAULT_UNLOCKED) by default #26

Merged
Androtim merged 1 commit from upstream-pr/26 into main 2026-11-28 21:17:44 +00:00
Androtim commented 2026-11-28 08:18:46 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T08:18:46Z.


Summary

Enable lock-free write-fault opening (VICTORY_FAULT_UNLOCKED) by default in crates/victory-gpu/src/watch.rs (opt-out via VICTORY_FAULT_UNLOCKED=0):

  • Switches unlocked() from crate::asked_for!("VICTORY_FAULT_UNLOCKED") to crate::toggled!("VICTORY_FAULT_UNLOCKED").
  • Converts UNLOCKED_IN_TEST from Cell<bool> to Cell<Option<bool>> so existing locked, unlocked, and mixed-thread concurrency tests keep exercising both paths deterministically.
  • Adds unit test watch::tests::fault_unlocked_defaults_on_and_respects_test_override.

Rig Specs Tested On

  • CPU: 13th Gen Intel(R) Core(TM) i7-13700F
  • GPU & VRAM: NVIDIA GeForce RTX 4060 Ti (8 GiB VRAM)
  • System RAM: 32 GiB
  • OS & GPU Driver: Windows 11 Home (Build 26300), NVIDIA Driver 32.0.16.2124

Run Settings & Profile

  • Build & Commit SHA: release / victory --features diagnostics @ d8fb397
  • Console Profile & Internal Resolution / Scale: series-s (default verify-world.ps1 baseline profile)
  • Ray Tracing: off
  • Upscaling: DLSS quality (-DlssMode quality)
  • Frame Generation: off
  • Launcher Command / Preset & Extra VICTORY_* Overrides: Default verifier run with no VICTORY_FAULT_UNLOCKED override (pr26-fault-unlocked), plus same-binary A/B comparison on pr24-diag.exe (ab-fault-unlocked vs pr24-loops-fallback-warm)
  • Scene / Area & Session Length: Mission-1 autosave dock transition into balcony scene (draws >= 500, max 11601 draws/frame), 75s in-world

Measurements & Verification

  • Base FPS (without Frame Gen):
    • Default-enabled binary (pr26-fault-unlocked, 75s, no override): without it 417 unlocked faults/frame vs 4 under lock; guards lock wait dropped from 83.31 ms/frame to 38.62 ms/frame; raw 14-window median 6.0 fps (dock PSO warmup 841 -> 280 still compiling), steady balcony 8.6-9.8 fps (median 9.5 fps), final_waiting=3887 (vs baseline 7121).
    • Controlled warm-cache A/B on pr24-diag.exe (ab-fault-unlocked vs pr24-loops-fallback-warm): guards lock wait 83.31 -> 27.91 ms/frame (-66.5%), preparing 50.15 -> 39.4 ms, median FPS 10.15 -> 10.9 fps (steady balcony peak 11.9 fps), final_waiting 3502 -> 1886.
    • Visuals: 24 PNGs sampled (lit=8/24, luma 105.03, edge energy 6.91, 0.0% magenta); inspected frame-9253.png & frame-9261.png.
  • Frame-Gen FPS (if enabled): N/A (off)
  • VRAM / RAM Usage: pr26-fault-unlocked copystat peak 5852 MB VRAM / 6952 MB budget (5435 MB shared PC RAM); ab-fault-unlocked 5708 MB vs 5915 MB.
  • Crashes / DRED Resets: 0 (crashes=0, no_host_texture_errors=0)
  • Automated Checks:
    • cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy (asset policy: 294 files ok)
    • cargo +1.98.1-x86_64-pc-windows-gnu test -p xtask (6 passed; 0 failed)
    • cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings (0 warnings)
    • cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features victory-gpu/diagnostics -- -D warnings (0 warnings)
    • cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu --lib -- --test-threads=1 (449 passed; 0 failed; 36 ignored, including fault_unlocked_defaults_on_and_respects_test_override)
    • Plain release & diagnostics --release builds (objdump -p: 0 non-system MinGW DLLs)
<!-- greyfinch-sync:Androtim/MiniVI:issue:5538245162 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/26). Originally posted by [Androtim](https://github.com/Androtim) on 2026-11-28T08:18:46Z. --- ## Summary Enable lock-free write-fault opening (`VICTORY_FAULT_UNLOCKED`) by default in `crates/victory-gpu/src/watch.rs` (opt-out via `VICTORY_FAULT_UNLOCKED=0`): - Switches `unlocked()` from `crate::asked_for!("VICTORY_FAULT_UNLOCKED")` to `crate::toggled!("VICTORY_FAULT_UNLOCKED")`. - Converts `UNLOCKED_IN_TEST` from `Cell<bool>` to `Cell<Option<bool>>` so existing locked, unlocked, and mixed-thread concurrency tests keep exercising both paths deterministically. - Adds unit test `watch::tests::fault_unlocked_defaults_on_and_respects_test_override`. ## Rig Specs Tested On - **CPU:** 13th Gen Intel(R) Core(TM) i7-13700F - **GPU & VRAM:** NVIDIA GeForce RTX 4060 Ti (8 GiB VRAM) - **System RAM:** 32 GiB - **OS & GPU Driver:** Windows 11 Home (Build 26300), NVIDIA Driver 32.0.16.2124 ## Run Settings & Profile - **Build & Commit SHA:** `release` / `victory --features diagnostics` @ `d8fb397` - **Console Profile & Internal Resolution / Scale:** `series-s` (default `verify-world.ps1` baseline profile) - **Ray Tracing:** `off` - **Upscaling:** `DLSS quality` (`-DlssMode quality`) - **Frame Generation:** `off` - **Launcher Command / Preset & Extra `VICTORY_*` Overrides:** Default verifier run with **no** `VICTORY_FAULT_UNLOCKED` override (`pr26-fault-unlocked`), plus same-binary A/B comparison on `pr24-diag.exe` (`ab-fault-unlocked` vs `pr24-loops-fallback-warm`) - **Scene / Area & Session Length:** Mission-1 autosave dock transition into balcony scene (`draws >= 500`, max `11601` draws/frame), `75s` in-world ## Measurements & Verification - **Base FPS (without Frame Gen):** - Default-enabled binary (`pr26-fault-unlocked`, 75s, no override): `without it 417` unlocked faults/frame vs `4` under lock; `guards` lock wait dropped from `83.31 ms/frame` to `38.62 ms/frame`; raw 14-window median `6.0 fps` (dock PSO warmup `841 -> 280` still compiling), steady balcony `8.6-9.8 fps` (median `9.5 fps`), `final_waiting=3887` (vs baseline `7121`). - Controlled warm-cache A/B on `pr24-diag.exe` (`ab-fault-unlocked` vs `pr24-loops-fallback-warm`): `guards` lock wait `83.31 -> 27.91 ms/frame` (-66.5%), `preparing` `50.15 -> 39.4 ms`, median FPS `10.15 -> 10.9 fps` (steady balcony peak `11.9 fps`), `final_waiting 3502 -> 1886`. - Visuals: `24` PNGs sampled (`lit=8/24`, luma `105.03`, edge energy `6.91`, `0.0%` magenta); inspected `frame-9253.png` & `frame-9261.png`. - **Frame-Gen FPS (if enabled):** N/A (`off`) - **VRAM / RAM Usage:** `pr26-fault-unlocked` `copystat` peak `5852 MB` VRAM / `6952 MB` budget (`5435 MB` shared PC RAM); `ab-fault-unlocked` `5708 MB` vs `5915 MB`. - **Crashes / DRED Resets:** `0` (`crashes=0`, `no_host_texture_errors=0`) - **Automated Checks:** - [x] `cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy` (`asset policy: 294 files ok`) - [x] `cargo +1.98.1-x86_64-pc-windows-gnu test -p xtask` (`6 passed; 0 failed`) - [x] `cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings` (`0` warnings) - [x] `cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features victory-gpu/diagnostics -- -D warnings` (`0` warnings) - [x] `cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu --lib -- --test-threads=1` (`449 passed; 0 failed; 36 ignored`, including `fault_unlocked_defaults_on_and_respects_test_override`) - [x] Plain release & diagnostics `--release` builds (`objdump -p`: `0` non-system MinGW DLLs)
Androtim commented 2026-11-28 09:03:03 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T09:03:03Z.


Automated triage for the maintainers (not an approval).

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

Review Summary

This PR flips VICTORY_FAULT_UNLOCKED from opt-in (crate::asked_for!) to opt-out (crate::toggled!, disabled via VICTORY_FAULT_UNLOCKED=0) in crates/victory-gpu/src/watch.rs, and updates the test override UNLOCKED_IN_TEST from Cell<bool> to Cell<Option<bool>>.

What looks good

  • Switch semantics: crate::toggled!("VICTORY_FAULT_UNLOCKED") (in crates/victory-gpu/src/switch.rs) cleanly defaults to true, honors =0 as opt-out, and preserves VICTORY_AB toggling under diagnostics builds.
  • Test isolation: Changing UNLOCKED_IN_TEST to Cell<Option<bool>> keeps mixed/locked/unlocked concurrency tests (faults_at_once_on_one_block_all_go_on and writes_to_views_are_not_lost) deterministic across both paths, and fault_unlocked_defaults_on_and_respects_test_override uses an RAII Restore guard to avoid leaking thread-local state.
  • CI: Passing, with a small, focused diff and no unrelated changes.

Minor note (non-blocking)

  • With UNLOCKED_IN_TEST defaulting to None (now unlocked by default), the single-threaded tests invoked inside faults_that_take_no_lock_tell_the_same and bits_and_holes_with_faults_that_take_no_lock now exercise the unlocked path both standalone and inside those wrappers; the locked path remains covered by faults_at_once_on_one_block_all_go_on and writes_to_views_are_not_lost.

Verdict

Needs local GPU test — Logic and test coverage look solid and CI is passing, but enabling lock-free write-fault opening (open_unlocked / settle) by default in victory-gpu/src/watch.rs changes a hot title-memory/GPU coherency path and warrants a local real-GPU smoke test (including default-on vs VICTORY_FAULT_UNLOCKED=0 sanity check) before merging.


Generated with Antigravity CLI (agy).

<!-- greyfinch-sync:Androtim/MiniVI:comment:7236979538 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/26#issuecomment-7236979538). Originally posted by [Androtim](https://github.com/Androtim) on 2026-11-28T09:03:03Z. --- <!-- minivi-triage v1 head=d8fb3972b1d96af816f34167a4240c9cac61cef4 verdict=needs-gpu-test ci=passing at=2026-11-28T09:03:29Z --> Automated triage for the maintainers (not an approval). **Verdict:** `needs-gpu-test` · **CI (`check`):** `passing` ### Review Summary This PR flips `VICTORY_FAULT_UNLOCKED` from opt-in (`crate::asked_for!`) to opt-out (`crate::toggled!`, disabled via `VICTORY_FAULT_UNLOCKED=0`) in `crates/victory-gpu/src/watch.rs`, and updates the test override `UNLOCKED_IN_TEST` from `Cell<bool>` to `Cell<Option<bool>>`. #### What looks good - **Switch semantics**: `crate::toggled!("VICTORY_FAULT_UNLOCKED")` (in `crates/victory-gpu/src/switch.rs`) cleanly defaults to `true`, honors `=0` as opt-out, and preserves `VICTORY_AB` toggling under `diagnostics` builds. - **Test isolation**: Changing `UNLOCKED_IN_TEST` to `Cell<Option<bool>>` keeps mixed/locked/unlocked concurrency tests (`faults_at_once_on_one_block_all_go_on` and `writes_to_views_are_not_lost`) deterministic across both paths, and `fault_unlocked_defaults_on_and_respects_test_override` uses an RAII `Restore` guard to avoid leaking thread-local state. - **CI**: Passing, with a small, focused diff and no unrelated changes. #### Minor note (non-blocking) - With `UNLOCKED_IN_TEST` defaulting to `None` (now unlocked by default), the single-threaded tests invoked inside `faults_that_take_no_lock_tell_the_same` and `bits_and_holes_with_faults_that_take_no_lock` now exercise the unlocked path both standalone and inside those wrappers; the locked path remains covered by `faults_at_once_on_one_block_all_go_on` and `writes_to_views_are_not_lost`. #### Verdict **Needs local GPU test** — Logic and test coverage look solid and CI is passing, but enabling lock-free write-fault opening (`open_unlocked` / `settle`) by default in `victory-gpu/src/watch.rs` changes a hot title-memory/GPU coherency path and warrants a local real-GPU smoke test (including default-on vs `VICTORY_FAULT_UNLOCKED=0` sanity check) before merging. --- _Generated with Antigravity CLI (`agy`)._
Androtim commented 2026-11-28 21:11:15 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T21:11:15Z.


Real-GPU Playtest Report (Combined Build 1 Stack — RT OFF)

Tested in combined Build 1 (origin/main + Build 1 PRs #2, #3, #4, #6, #7, #9, #10, #11, #12, #14, #15, #18, #19, #22, #25, #26, #27, #33, #34, #36, #40, #43, #44, #46) on NVIDIA GeForce RTX 4060 Ti (8 GB), Windows, Series S (quality-720p, DLSS Quality):

  • Duration & Stability: 21-minute open-world session (1a-build1-world.log) — 0 crashes, 0 DRED resets, clean exit.
  • Performance: 28.2 fps (35.4 ms/frame) mid-run, 16.9 fps (59.3 ms/frame, 4,446 draws/frame) in heavy scene.
  • Key Subsystems Verified in Logs:
    • Swap chain / tearing: tearing=true, 0 refused presents.
    • Underwater compute (926c46bab3b86bd6): Translated and built host PSO cleanly.
    • Descriptor slots (VICTORY_THIN_GATE): Active (0 no free dynamic descriptor slots warnings).
    • VRAM & texture pool: Bounded at 6,934 MB in use (33 texture blocks = 2,112 MB, 1,036 MB free), 0 bogus POOL: errors.
    • DLSS: 16,577 upscalings (0 failed).
  • Visual observation during heavy initial streaming: Character top briefly appeared solid black while 8,802 textures were still queued / 206 non-RT draws dropped without a host pipeline; no D3D12 errors.
<!-- greyfinch-sync:Androtim/MiniVI:comment:7245834862 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/26#issuecomment-7245834862). Originally posted by [Androtim](https://github.com/Androtim) on 2026-11-28T21:11:15Z. --- ### Real-GPU Playtest Report (Combined Build 1 Stack — RT OFF) Tested in combined Build 1 (`origin/main` + Build 1 PRs `#2, #3, #4, #6, #7, #9, #10, #11, #12, #14, #15, #18, #19, #22, #25, #26, #27, #33, #34, #36, #40, #43, #44, #46`) on **NVIDIA GeForce RTX 4060 Ti (8 GB), Windows, Series S (`quality-720p`, DLSS Quality)**: - **Duration & Stability:** **21-minute** open-world session (`1a-build1-world.log`) — **0 crashes, 0 DRED resets**, clean exit. - **Performance:** `28.2 fps` (`35.4 ms/frame`) mid-run, `16.9 fps` (`59.3 ms/frame`, `4,446` draws/frame) in heavy scene. - **Key Subsystems Verified in Logs:** - **Swap chain / tearing:** `tearing=true`, `0` refused presents. - **Underwater compute (`926c46bab3b86bd6`):** Translated and built host PSO cleanly. - **Descriptor slots (`VICTORY_THIN_GATE`):** Active (`0` `no free dynamic descriptor slots` warnings). - **VRAM & texture pool:** Bounded at `6,934 MB` in use (`33` texture blocks = `2,112 MB`, `1,036 MB` free), `0` bogus `POOL:` errors. - **DLSS:** `16,577` upscalings (`0` failed). - **Visual observation during heavy initial streaming:** Character top briefly appeared solid black while `8,802` textures were still queued / `206` non-RT draws dropped without a host pipeline; no D3D12 errors.
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
Androtim/MiniVI!26
No description provided.