Open a single unaliased write-watch block without allocating #101

Manually merged
github merged 1 commit from github-bot/gh-101 into main 2026-11-27 02:43:08 +00:00 AGit
Owner

@⁠cxy0072019-sketch on GitHub · 2026-11-27 01:16 UTC · original
cxy0072019-sketch:codex/single-unaliased-guard → main · +10 −0 · 1 files · 1 commits · merged 2026-11-27 02:28 UTC

Summary

Open a single unaliased write-watch block through the existing unguard helper without allocating temporary vectors for the range scan. Aliased and multi-block ranges use the range traversal. The single-block idea comes from victory-fork #1400.

Validation

  • All 29 Windows release watch::tests passed on this standalone patch, including shared-view and concurrent write cases.
  • I tested two before/after pairs on Series S at 1920×1080 on an RTX 5070 Ti. Each pair used the same checkpoint and launch options, with local water fixes in both executables. The early sailing windows had about 3,700 draws per frame. I checked the boat, wake and reflection during the enabled-pool run.
Readback pool Early sailing FPS before → after CPU submission ms/frame before → after Full measured route FPS before → after
Off 18.69 → 19.83 49.97 → 47.80 17.79 → 18.35
On 19.20 → 19.66 49.19 → 47.54 17.87 → 18.00

The early window covers seconds 4–20 after acceleration. The longer windows include shoreline streaming and varied by run.

**@⁠cxy0072019-sketch** on GitHub · 2026-11-27 01:16 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/101) `cxy0072019-sketch:codex/single-unaliased-guard` → `main` · +10 −0 · 1 files · 1 commits · merged 2026-11-27 02:28 UTC ## Summary Open a single unaliased write-watch block through the existing `unguard` helper without allocating temporary vectors for the range scan. Aliased and multi-block ranges use the range traversal. The single-block idea comes from [victory-fork #1400](https://github.com/fxceless/victory-fork/pull/1400). ## Validation - All 29 Windows release `watch::tests` passed on this standalone patch, including shared-view and concurrent write cases. - I tested two before/after pairs on Series S at 1920×1080 on an RTX 5070 Ti. Each pair used the same checkpoint and launch options, with local water fixes in both executables. The early sailing windows had about 3,700 draws per frame. I checked the boat, wake and reflection during the enabled-pool run. | Readback pool | Early sailing FPS before → after | CPU submission ms/frame before → after | Full measured route FPS before → after | | --- | ---: | ---: | ---: | | Off | 18.69 → 19.83 | 49.97 → 47.80 | 17.79 → 18.35 | | On | 19.20 → 19.66 | 49.19 → 47.54 | 17.87 → 18.00 | The early window covers seconds 4–20 after acceleration. The longer windows include shoreline streaming and varied by run.
Adapt the single-block fast path from fxceless/victory-fork#1400. Keep the existing alias path and protection handling.

(cherry picked from commit 11d5975dfe9abcbaf3669f95d96c8ed828f8a05d)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 01:29:48 +00:00
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 01:28 UTC · original

Thanks, @⁠cxy0072019-sketch. I checked 3c7ad08: the single-block path still uses unguard to update protection and write tracking, and aliased or wider ranges still use the existing scan under the same locking. The Windows CI logs show 30 write-watch tests passing in the default build and 33 in diagnostics.

**@⁠TaynanGT** on GitHub · 2026-11-27 01:28 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/101#issuecomment-7207315295) Thanks, @⁠cxy0072019-sketch. I checked `3c7ad08`: the single-block path still uses `unguard` to update protection and write tracking, and aliased or wider ranges still use the existing scan under the same locking. The Windows CI logs show 30 write-watch tests passing in the default build and 33 in diagnostics.
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 01:41 UTC · original

I ran the two standalone diagnostics builds, cc9ed86c and 3c7ad08, on the RTX 4090 (621.40) in the Series S profile, rendering at 1920×1080 in full screen. Both started from identical local save data and rendered the opening cutscene. Neither run logged an error or device removal. In the first 60 seconds after the logs reached 1,000 draws per frame, the control and the PR peaked at 3,849 and 4,108 draws per frame, respectively. The PR logged a median of 2,923 handled write-guard faults per frame in that window.

The control had up to 803 pipelines still being built in that window. The PR ran second and had none pending, so the timing is confounded by the warm driver cache. The fault counter covers single-block openings without exposing whether a block had aliases. This confirms that both builds render the intro, with the player-controlled comparison still outstanding.

**@⁠TaynanGT** on GitHub · 2026-11-27 01:41 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/101#issuecomment-7207495369) I ran the two standalone diagnostics builds, `cc9ed86c` and `3c7ad08`, on the RTX 4090 (621.40) in the Series S profile, rendering at 1920×1080 in full screen. Both started from identical local save data and rendered the opening cutscene. Neither run logged an error or device removal. In the first 60 seconds after the logs reached 1,000 draws per frame, the control and the PR peaked at 3,849 and 4,108 draws per frame, respectively. The PR logged a median of 2,923 handled write-guard faults per frame in that window. The control had up to 803 pipelines still being built in that window. The PR ran second and had none pending, so the timing is confounded by the warm driver cache. The fault counter covers single-block openings without exposing whether a block had aliases. This confirms that both builds render the intro, with the player-controlled comparison still outstanding.
github manually merged commit 5b59b815d9 into main 2026-11-27 02:43:08 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.