gpu: fuse AVX2 shadow diff/update and merge passes (VICTORY_UNDER_FUSED) #188

Closed
github-bot wants to merge 1 commit from gh-pr/188/head into gh-pr/188/base
Owner

@⁠Androtim on GitHub · 2026-11-30 03:02 UTC · original
Androtim:feat/iter185-shadow-fused-word-runs → main · +333 −24 · 1 files · 1 commits · closed without merging

Summary

  • Add word_runs_and_update / word_runs_and_update_avx2 to compare title memory against the host snapshot and copy differing 32-byte AVX2 chunks in a single pass, and use it in the SEND diff path and card-backed write-merge path.
  • Add merge_page_fused gated by VICTORY_UNDER_FUSED (enabled by default) so merge_page_under_writes compares and updates aligned card-backed pages in one pass whenever standalone-copy headroom covers the page bound (n / 260 + 1), returning unused copy credits afterward.
  • Replace per-page binary searches in stale_pages_in / stale_pages_in_atomic with a shared linear two-pointer scan (stale_pages_with) seeded once via partition_point.
  • Added unit tests merge_tests::word_runs_and_update_matches_word_runs_and_copies_exactly, merge_tests::a_page_merged_in_one_pass_is_the_page_merged_in_two, and land_tests::title_bytes_go_in_under_writes_the_same_in_one_pass_and_in_two, plus cursor-skip coverage in stale_tests::pages_never_taken_are_stale_written_or_not.

Verification

  • cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy (311 files ok)
  • cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu shadow:: -- --test-threads=1 (46 passed; 0 failed; 2 ignored)
  • cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings
  • cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features diagnostics -- -D warnings
  • Live 75s Series S verification (PlayParity): all 6 gates PASS, median 12.9 fps (preparing 34.5 ms), used_max=6409 MB / budget_min=6838 MB (over=0 MB, room_false=70.6%), final_waiting=1960, mapped_rate=8.25 ms/s, lit=19/24 (luma=104.7, near_black=0.0%, magenta=0.0%), 0 crashes; late captured PNGs visually verified crisp.
  • Live 75s Series X 1440p verification (PlayParity): median 10.5 fps (preparing 39.2 ms), min 5.5 fps, lit=18/24 (luma=105.47, near_black=0.0%, magenta=0.0%), 0 crashes; late captured PNGs visually verified crisp.
**@⁠Androtim** on GitHub · 2026-11-30 03:02 UTC · [original](https://github.com/Androtim/MiniVI/pull/188) `Androtim:feat/iter185-shadow-fused-word-runs` → `main` · +333 −24 · 1 files · 1 commits · closed without merging ## Summary - Add `word_runs_and_update` / `word_runs_and_update_avx2` to compare title memory against the host snapshot and copy differing 32-byte AVX2 chunks in a single pass, and use it in the `SEND` diff path and card-backed write-merge path. - Add `merge_page_fused` gated by `VICTORY_UNDER_FUSED` (enabled by default) so `merge_page_under_writes` compares and updates aligned card-backed pages in one pass whenever standalone-copy headroom covers the page bound (`n / 260 + 1`), returning unused copy credits afterward. - Replace per-page binary searches in `stale_pages_in` / `stale_pages_in_atomic` with a shared linear two-pointer scan (`stale_pages_with`) seeded once via `partition_point`. - Added unit tests `merge_tests::word_runs_and_update_matches_word_runs_and_copies_exactly`, `merge_tests::a_page_merged_in_one_pass_is_the_page_merged_in_two`, and `land_tests::title_bytes_go_in_under_writes_the_same_in_one_pass_and_in_two`, plus cursor-skip coverage in `stale_tests::pages_never_taken_are_stale_written_or_not`. ## Verification - `cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy` (`311 files ok`) - `cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu shadow:: -- --test-threads=1` (`46 passed; 0 failed; 2 ignored`) - `cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings` - `cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features diagnostics -- -D warnings` - Live 75s Series S verification (`PlayParity`): **all 6 gates PASS**, median `12.9 fps` (`preparing 34.5 ms`), `used_max=6409 MB / budget_min=6838 MB` (`over=0 MB`, `room_false=70.6%`), `final_waiting=1960`, `mapped_rate=8.25 ms/s`, `lit=19/24` (`luma=104.7`, `near_black=0.0%`, `magenta=0.0%`), `0` crashes; late captured PNGs visually verified crisp. - Live 75s Series X 1440p verification (`PlayParity`): median `10.5 fps` (`preparing 39.2 ms`), `min 5.5 fps`, `lit=18/24` (`luma=105.47`, `near_black=0.0%`, `magenta=0.0%`), `0` crashes; late captured PNGs visually verified crisp.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 20:16:56 +00:00
github-bot closed this pull request 2026-12-01 20:16:56 +00:00
Author
Owner

@⁠Androtim on GitHub · 2026-11-30 04:03 UTC · original · edited 2026-11-30 16:02 UTC

Automated triage for the maintainers (not an approval).

Verdict: needs-rebase · CI (check): passing

This PR no longer merges cleanly into main.

To change the verdict: Rebase onto current main and resolve conflicts; CI and triage will run again automatically.


Generated with Antigravity CLI (agy).

**@⁠Androtim** on GitHub · 2026-11-30 04:03 UTC · [original](https://github.com/Androtim/MiniVI/pull/188#issuecomment-7268436233) · edited 2026-11-30 16:02 UTC <!-- minivi-triage v1 head=cab1cbfa8a8888f34d2cb012daa36d5ff756cc8a verdict=needs-rebase ci=passing at=2026-11-30T16:03:01Z --> Automated triage for the maintainers (not an approval). **Verdict:** `needs-rebase` · **CI (`check`):** `passing` This PR no longer merges cleanly into `main`. **To change the verdict:** Rebase onto current `main` and resolve conflicts; CI and triage will run again automatically. --- _Generated with Antigravity CLI (`agy`)._
Author
Owner

@⁠Androtim on GitHub · 2026-11-30 08:41 UTC · original

GitHub reports merge conflicts against current main after Wave 6 merged. Please rebase onto latest main.

**@⁠Androtim** on GitHub · 2026-11-30 08:41 UTC · [original](https://github.com/Androtim/MiniVI/pull/188#issuecomment-7273213361) GitHub reports merge conflicts against current `main` after Wave 6 merged. Please rebase onto latest `main`.
Author
Owner

@⁠Androtim on GitHub · 2026-12-01 01:38 UTC · original

Closing conflicting opt-in VICTORY_* toggle PR per #276 policy (replace flawed base paths with default-on replacements rather than stacking opt-in toggles).

**@⁠Androtim** on GitHub · 2026-12-01 01:38 UTC · [original](https://github.com/Androtim/MiniVI/pull/188#issuecomment-7297725244) Closing conflicting opt-in VICTORY_* toggle PR per #276 policy (replace flawed base paths with default-on replacements rather than stacking opt-in toggles).

Pull request closed

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!188
No description provided.