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

Manually merged
github merged 2 commits from github-bot/gh-423 into gh-pr/423/base 2026-12-04 05:55:41 +00:00 AGit
Owner

@⁠Androtim on GitHub · 2026-12-04 05:17 UTC · original
Androtim:fix/watch-page-mirror-alias-hdr-audio → main · +240 −13 · 2 files · 2 commits · merged 2026-12-04 05:54 UTC

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** on GitHub · 2026-12-04 05:17 UTC · [original](https://github.com/Androtim/MiniVI/pull/423) `Androtim:fix/watch-page-mirror-alias-hdr-audio` → `main` · +240 −13 · 2 files · 2 commits · merged 2026-12-04 05:54 UTC ## 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 \
Ported verified GPL-3.0 upstream fixes for Wave 8A:

1. TrustNo1/Darner PR #163 (commit bc1e3fd, originally readmet3xt-lab/foxhound PR #504, GPL-3.0):
   - Emit whole-record parts via sync_record_parts() in victory-gpu/src/descriptor.rs so descriptor records crossing a watch-page boundary are mirrored even when only the second page was dirtied, with each touched record appearing in exactly one part.
   - Added unit tests dirty_parts_cover_only_touched_records_once and dirty_sampler_across_two_watch_pages_is_mirrored.

2. lobomfz/VIctory-xmem PR #424 (commit ca1f0e4, GPL-3.0):
   - Count aliased views whose clean bit open_resolved_with() actually cleared in single-view mode (ALIASES[1] diagnostic in victory-gpu/src/watch.rs), instead of adding blocks.len() - here which was always 0 when open_one_view() is enabled.
   - Added unit test open_resolved_with_counts_cleared_clean_aliases.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-04 05:17:55 +00:00
github-bot force-pushed github-bot/gh-423 from b6beba7dbc to 07427d8075 2026-12-04 05:23:43 +00:00 Compare
Author
Owner

@⁠Androtim on GitHub · 2026-12-04 05:31 UTC · original

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.
**@⁠Androtim** on GitHub · 2026-12-04 05:31 UTC · [original](https://github.com/Androtim/MiniVI/pull/423#issuecomment-7402477554) 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.
Guard the single-view diagnostics alias open counter in
open_resolved_with() with !(first..last).contains(&other), matching the
multi-view branch. Because snapshot_open_aliases() populates others from
inplace::pages_of() (which includes block itself) and unguard_in_set()
runs after the loop, omitting the range check overcounted block itself
and any other clean alias inside first..last.

Also expand open_resolved_with_counts_cleared_clean_aliases to verify
exact ALIASES[1] deltas (2 with in-range clean blocks present, 0 when no
external alias is clean) and serialize the two descriptor unit tests
that directly call sync_heaps() so parallel test execution cannot
consume each other's write-watch bits.
github-bot changed target branch from main to gh-pr/423/base 2026-12-04 05:55:39 +00:00
github manually merged commit ca3e4c109e into gh-pr/423/base 2026-12-04 05:55:41 +00:00
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!423
No description provided.