gpu(descriptor): cache placed-view shapes per thread and batch mirror_range in copy_simple #222

Manually merged
github merged 1 commit from gh-pr/222/head into gh-pr/222/base 2026-12-01 20:20:00 +00:00
Owner

@⁠Androtim on GitHub · 2026-11-30 08:47 UTC · original
Androtim:feat/iter219-descriptor-local-shapes-and-mirror-range → main · +182 −17 · 1 files · 1 commits · merged 2026-11-30 10:56 UTC

Summary

  • Add a per-thread LOCAL_SHAPES read-through cache (shape_number, placed_view, build_placed_view) for the append-only VIEW_SHAPES table so hot placed-view encodes and decodes resolve without acquiring VIEW_SHAPES locks.
  • Add a lock-free heap.host.get() fast path to mirror before locking heap.pending, and extract batched mirror_range for copy_simple so contiguous shader-visible copies acquire SHADER_HEAPS once and CPU-heap copies exit in O(1).
  • Add unit tests local_shapes_cache_resolves_and_deduplicates_across_threads and copy_simple_copies_multiple_cpu_descriptors_cleanly.

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 --lib descriptor:: -- --test-threads=1: 74 passed; 0 failed; 0 ignored
  • cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings: exit 0
  • cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features diagnostics -- -D warnings: exit 0
  • Live GPU check (Series S, 75s): all 6 verifier gates passed (10.8 fps, preparing 39.0 ms, over=0 MB 6651/6718 MB, 0 crashes, lit=19/24, luma=103.49, near_black=0.0%, edge_energy=7.02, magenta=0.0%, crisp frames inspected)
  • Live GPU check (Series X 1440p, 75s): 10.5 fps (preparing 43.6 ms, over=0 MB 6803/6856 MB, 0 crashes, lit=18/24, luma=95.0, near_black=7.7%, edge_energy=6.66, magenta=0.0%; baseline room_false=94.4% / final_waiting=11910)
**@⁠Androtim** on GitHub · 2026-11-30 08:47 UTC · [original](https://github.com/Androtim/MiniVI/pull/222) `Androtim:feat/iter219-descriptor-local-shapes-and-mirror-range` → `main` · +182 −17 · 1 files · 1 commits · merged 2026-11-30 10:56 UTC ## Summary - Add a per-thread `LOCAL_SHAPES` read-through cache (`shape_number`, `placed_view`, `build_placed_view`) for the append-only `VIEW_SHAPES` table so hot placed-view encodes and decodes resolve without acquiring `VIEW_SHAPES` locks. - Add a lock-free `heap.host.get()` fast path to `mirror` before locking `heap.pending`, and extract batched `mirror_range` for `copy_simple` so contiguous shader-visible copies acquire `SHADER_HEAPS` once and CPU-heap copies exit in O(1). - Add unit tests `local_shapes_cache_resolves_and_deduplicates_across_threads` and `copy_simple_copies_multiple_cpu_descriptors_cleanly`. ## 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 --lib descriptor:: -- --test-threads=1`: `74 passed; 0 failed; 0 ignored` - `cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings`: exit 0 - `cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features diagnostics -- -D warnings`: exit 0 - Live GPU check (Series S, 75s): all 6 verifier gates passed (`10.8 fps`, `preparing 39.0 ms`, `over=0 MB` `6651/6718 MB`, `0` crashes, `lit=19/24`, `luma=103.49`, `near_black=0.0%`, `edge_energy=7.02`, `magenta=0.0%`, crisp frames inspected) - Live GPU check (Series X 1440p, 75s): `10.5 fps` (`preparing 43.6 ms`, `over=0 MB` `6803/6856 MB`, `0` crashes, `lit=18/24`, `luma=95.0`, `near_black=7.7%`, `edge_energy=6.66`, `magenta=0.0%`; baseline `room_false=94.4%` / `final_waiting=11910`)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 20:19:49 +00:00
github manually merged commit fa99c9678f into gh-pr/222/base 2026-12-01 20:19:59 +00:00
Author
Owner

@⁠Androtim on GitHub · 2026-11-30 10:56 UTC · original

Hardware-verified on RTX 4060 Ti 8 GB (Series X 1440p -PlayParity, stacked Wave 8: #219, #220, #222–#231, #236):

  • Unit/GPU Tests: victory + victory-formats + victory-hle (219+1) + victory-gpu (615/615 passed, 39 ignored) — 0 failures
  • Open-World Verify: verify-wave8 uncontended 5.55 fps | warm verify-wave8-warm: 0 crashes/DRED, pipeline_drops=238 (vs 315.5), final_waiting=24475 (vs 25081), no_room_so_far=6000 (vs 8500), VRAM 7295/6865 MB
  • Visuals: spotless lit golden stairs, deck, concrete, and Jason (luma=100.29, near_black=0.11%, edge_energy=16.95, magenta=0.0%), 0 failed bakes

Merging onto main.

**@⁠Androtim** on GitHub · 2026-11-30 10:56 UTC · [original](https://github.com/Androtim/MiniVI/pull/222#issuecomment-7276287293) Hardware-verified on RTX 4060 Ti 8 GB (Series X 1440p `-PlayParity`, stacked Wave 8: `#219, #220, #222–#231, #236`): - **Unit/GPU Tests:** `victory` + `victory-formats` + `victory-hle` (`219+1`) + `victory-gpu` (`615/615` passed, `39` ignored) — 0 failures - **Open-World Verify:** `verify-wave8` uncontended `5.55 fps` | warm `verify-wave8-warm`: `0` crashes/DRED, `pipeline_drops=238` (vs `315.5`), `final_waiting=24475` (vs `25081`), `no_room_so_far=6000` (vs `8500`), `VRAM 7295/6865 MB` - **Visuals:** spotless lit golden stairs, deck, concrete, and Jason (`luma=100.29`, `near_black=0.11%`, `edge_energy=16.95`, `magenta=0.0%`), `0` failed bakes Merging onto `main`.
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!222
No description provided.