fix(gpu): mirror cross-watch-page descriptor records and fix alias open count (Wave 8A) #423

Merged
Androtim merged 2 commits from upstream-pr/423 into main 2026-12-04 05:54:16 +00:00
Androtim commented 2026-12-04 05:17:46 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-04T05:17:46Z.


Summary

Ports the applicable verified Wave 8A (\GPL-3.0) upstream fixes without touching \pipeline/library.rs:

Ported

  1. Mirror descriptor records crossing a watch-page boundary — ported from \TrustNo1/Darner\ PR #163 (commit \c1e3fd, originally
    eadmet3xt-lab/foxhound\ PR #504, \GPL-3.0) in \crates/victory-gpu/src/descriptor.rs:
    • Added \sync_record_parts()\ so written byte ranges are converted into deduplicated whole-record parts (runs within a watch page, or a single record crossing a page boundary in its own part).
    • Updated \sync_heaps()\ so records straddling a watch-page boundary are mirrored even when only the second page was dirtied.
    • Preserves all existing MiniVI changes in \descriptor.rs\ / \descriptor/host.rs\ (including PR #420 stand-in alpha and PR #422 bounded placed-view table).
    • Added unit tests \dirty_parts_cover_only_touched_records_once\ (including 1-byte second-page boundary writes for 16- and 32-byte records) and \dirty_sampler_across_two_watch_pages_is_mirrored.
  2. Fix aliased view open count diagnostic (\ALIASES[1]) — ported from \lobomfz/VIctory-xmem\ PR #424 (commit \ca1f0e4, \GPL-3.0) in \crates/victory-gpu/src/watch.rs:
    • In \open_resolved_with(), when \open_one_view()\ is enabled (default), \locks\ was never appended to so \locks.len() - here\ always added \
<!-- greyfinch-sync:Androtim/MiniVI:issue:5640796552 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/423). Originally posted by [Androtim](https://github.com/Androtim) on 2026-12-04T05:17:46Z. --- ## Summary Ports the applicable verified **Wave 8A** (\GPL-3.0\) upstream fixes without touching \pipeline/library.rs\: ### Ported 1. **Mirror descriptor records crossing a watch-page boundary** — ported from \TrustNo1/Darner\ PR #163 (commit \c1e3fd\, originally \ eadmet3xt-lab/foxhound\ PR #504, \GPL-3.0\) in \crates/victory-gpu/src/descriptor.rs\: - Added \sync_record_parts()\ so written byte ranges are converted into deduplicated whole-record parts (runs within a watch page, or a single record crossing a page boundary in its own part). - Updated \sync_heaps()\ so records straddling a watch-page boundary are mirrored even when only the second page was dirtied. - Preserves all existing MiniVI changes in \descriptor.rs\ / \descriptor/host.rs\ (including PR #420 stand-in alpha and PR #422 bounded placed-view table). - Added unit tests \dirty_parts_cover_only_touched_records_once\ (including 1-byte second-page boundary writes for 16- and 32-byte records) and \dirty_sampler_across_two_watch_pages_is_mirrored\. 2. **Fix aliased view open count diagnostic (\ALIASES[1]\)** — ported from \lobomfz/VIctory-xmem\ PR #424 (commit \ca1f0e4\, \GPL-3.0\) in \crates/victory-gpu/src/watch.rs\: - In \open_resolved_with()\, when \open_one_view()\ is enabled (default), \locks\ was never appended to so \locks.len() - here\ always added \
Androtim commented 2026-12-04 05:31:57 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-04T05:31:57Z.


Triage (07427d80, CI check PASS, MERGEABLE):

  • Clean, 100% title-neutral Wave 8A port (+208/-13 across descriptor.rs + watch.rs, zero new opt-in toggles) with solid unit tests:
    1. sync_record_parts() in descriptor.rs (from TrustNo1/Darner #163 / foxhound #504, GPL-3.0) deduplicates written byte ranges into whole-record parts so descriptor records straddling a watch-page boundary are mirrored even when only the second page is dirtied.
    2. open_resolved_with() in watch.rs (from lobomfz/VIctory-xmem #424, GPL-3.0) fixes ALIASES[1] diagnostic accounting in single-view mode.
  • Marked triage: needs gpu test — awaiting Gate 2 Audit (#282) + Gate 3 plain---release verification before merging.
<!-- greyfinch-sync:Androtim/MiniVI:comment:7402477554 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/423#issuecomment-7402477554). Originally posted by [Androtim](https://github.com/Androtim) on 2026-12-04T05:31:57Z. --- Triage (`07427d80`, **CI `check` PASS**, `MERGEABLE`): - Clean, 100% title-neutral Wave 8A port (`+208/-13` across `descriptor.rs` + `watch.rs`, **zero new opt-in toggles**) with solid unit tests: 1. `sync_record_parts()` in `descriptor.rs` (from `TrustNo1/Darner` `#163` / `foxhound` `#504`, GPL-3.0) deduplicates written byte ranges into whole-record parts so descriptor records straddling a watch-page boundary are mirrored even when only the second page is dirtied. 2. `open_resolved_with()` in `watch.rs` (from `lobomfz/VIctory-xmem` `#424`, GPL-3.0) fixes `ALIASES[1]` diagnostic accounting in single-view mode. - Marked `triage: needs gpu test` — awaiting Gate 2 Audit (`#282`) + Gate 3 plain-`--release` verification before merging.
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!423
No description provided.