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

Merged
cxy0072019-sketch merged 1 commit from upstream-pr/101 into main 2026-11-27 02:28:06 +00:00
cxy0072019-sketch commented 2026-11-27 01:16:31 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by cxy0072019-sketch on 2026-11-27T01:16:31Z.


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.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:issue:5519499263 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/101). Originally posted by [cxy0072019-sketch](https://github.com/cxy0072019-sketch) on 2026-11-27T01:16:31Z. --- ## 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.
TaynanGT commented 2026-11-27 01:28:23 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-27T01:28:23Z.


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.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7207315295 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/101#issuecomment-7207315295). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T01:28:23Z. --- 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 commented 2026-11-27 01:41:13 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-27T01:41:13Z.


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.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7207495369 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/101#issuecomment-7207495369). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T01:41:13Z. --- 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.
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
TaynanGT/Vice-Tay!101
No description provided.