VSP-19: Placed-view table (Views) bounded shapes, hash indexes, and sliced idle eviction #25
No reviewers
Labels
No labels
accessibility
benchmark
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
task-claim
telemetry
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/monte-alt--vesper!25
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-25"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@adriaespii on GitHub · 2026-11-30 20:30 UTC · original
adriaespii:vsp-19-views-idle-eviction→main· +25 −8 · 1 files · 66 commits · closed without mergingSummary
VSP-19(linked Task Claim issue: #24, roadmap task: #12, related: #5)Views::indexandViews::shape_indexincrates/vesper-gpu/src/descriptor.rsfromBTreeMaptoHashMap(derivingHashonView) for O(1) lookups and lower per-entry overhead.PLACED_SHAPE_CAP = 262_144soshapes/shape_indexstay bounded, overflowing any additional shapes cleanly into the evictable table.SWEEP_SLICE = 4096,IDLE_EVICT_FRAMES = 1_800,EVICT_HIGH_WATER = 65_536, periodic sweep everySWEEP_PERIOD_FRAMES = 16fromsync_heapsand on-demand whenfreeis empty) for resource-less entries (View::PlacedandView::Constant) only; resource-backed views (Shader/Unordered) and samplers are never evicted.last_used: AtomicU64per slot updated lock-free underVIEWS.read()onlookup_entry/entry_of(skipping redundant stores within the same frame), incrementsgeneration+ markslive = false/retired = trueon eviction so stale handles always resolve toNone, and tracksRETIRED_TOTAL/RETIRED_READScounters.descriptor::tests:placed_shape_cap_bounds_shapes_and_falls_back_to_table,idle_eviction_retires_stale_placed_views_and_reuses_slots, andidle_eviction_never_retires_resource_views_or_samplers.AI Assistance Disclosure
Benchmark Comparison (Required for perf / GPU / memory changes)
Hardware: AMD Ryzen 5 7600 (6C/12T) / 32 GB DDR5-6000 / AMD Radeon RX 9070 16 GB (driver 32.0.32029.2010) / Windows 11 Pro build 26300
Profile:
scripts\launch.cmd[1]Series X — 1440p Native (2560x1440,VESPER_RENDER_SCALE=1.0, HW RT)main7b7e556)retired_reads(Note: After run duration was 127.05 s / 2,874 gameplay frames vs. 230.64 s / 1,135 gameplay frames Before;
dropped_pso=0,dropped_ind=0, steady-state visuals clean.)Local Verification Results
cargo xtask policy: 316 files okcargo test -p xtask --locked: 9 passed, 0 failedcargo clippy --workspace --all-targets --all-features --locked -- -D warnings: 0 warnings, 0 errorscargo test -p vesper-gpu --locked -- --test-threads=1: 541 passed, 0 failed, 35 ignoredcargo test -p vesper-gpu --features diagnostics --locked descriptor::tests -- --test-threads=1: 13 passed, 0 failedcargo test --workspace --locked -- --test-threads=1: all crates pass except 2 pre-existing WARP 8-bit unorm rounding tests in untouchedvesper-shader(emit::valu_tests::normalized_buffer_formats_load_correctly_rounded_quotientsandnormalized_codes_truncate_back_to_themselveson Win11 build 26300).Mandatory Verification Checklist
AGENTS.md, stays inside claimedVSP-19files (crates/vesper-gpu/src/descriptor.rsonly), and avoids the Maintainer Active Queue (ROADMAP.md)cargo xtask policyandcargo test -p xtask --lockedpass cleanlycargo clippy --workspace --all-targets --all-features --locked -- -D warningspasses with 0 warningscargo test -p vesper-gpu --locked -- --test-threads=1and diagnosticsdescriptor::testspass (plus workspace tests noted above)VESPER_WAIT_RESIDENT=textures, indirect clamping intact) and steady-state visuals are verified cleanpeer-review-gate) before maintainer review@monte-alt on GitHub · 2026-11-30 20:58 UTC · original
thank you for testing this. reusing a slot clears the retired flag. reading the old handle after that can fail without counting a retired read. can you test that case and repeat both drives on the same route for the same duration?
af5866b865to2f3f7f7433@adriaespii on GitHub · 2026-11-30 23:23 UTC · original
@monte-alt Good catch, thank you! Fixed in the latest commit (rebased onto
main):ViewEntrynow keeps a small fixed ring of recently retired generations (retired_gens: [u32; 4]) that persists across slot reuse andforget(), so any stale read of an idle-retired generation still incrementsRETIRED_READSeven after the slot is recycled for a newer view. Added an explicit post-reuse assertion for this case indescriptor::tests::idle_eviction_retires_stale_placed_views_and_reuses_slots(all 13descriptor::tests,xtask policy, andclippy -D warningspass). I will re-run both Before (main) and After (this PR) drives on the exact same route and duration and update the benchmark table once captured.@adriaespii on GitHub · 2026-12-01 00:17 UTC · original · edited 2026-12-01 13:53 UTC
@monte-alt Here are the same-route, matched-duration runs on
v0.9.0(Series X 1440p Native + HW RT, Ryzen 5 7600 / 32 GB / RX 9070):origin/main37555a4)PR #252f3f7f7)retired/retired_readsHonest notes on these two runs:
Afterrun was executed first right after rebasing ontov0.9.0(coldv0.9.0pipeline cache, compiling pipelines during the run and pushing free RAM down to 61 MB), whereasBeforeran second with thev0.9.0pipeline library already warm on disk.PLACED_SHAPE_CAP = 262_144andEVICT_HIGH_WATER = 65_536, overflow never crossed the high-water mark (retired = 0,retired_reads = 0, visuals completely clean).Afterrun (or a longer 10-minute city drive so eviction actively fires with the newretired_gensring) if you want warm-vs-warm numbers before review.2f3f7f7433to146eead77ePull request closed