Commit 5ea62e0
committed
splat3d/PR6: SplatFrame + SplatRenderer double-buffer driver (PR 6)
Sibling of hpc::renderer::Renderer for the SPO graph viz. Same
shape: two RwLock<SplatFrame>s, AtomicUsize front_idx, atomic
swap(). The instance pattern (vs module-level globals) lets
medvol and lance-graph-render each own their own SplatRenderer.
SplatFrame::tick runs the full PR 1-5 pipeline:
project_batch → TileBinning::from_projected → rasterize_frame
→ frame_id += 1
The state mutation is guarded by &mut self (frame) or the back
RwLock write guard (renderer).
SplatRenderer::tick overrides frame_id with a global AtomicU64
tick_count so front_frame_id() is monotonically increasing across
both frame slots (not per-slot).
GaussianBatch and TileBinning do not implement Debug, so
SplatFrame/SplatRenderer omit #[derive(Debug)] rather than touch
PR 2/4 files.
Tests (10): with_capacity sanity, tick increments frame_id,
tick renders a visible gaussian, monotonic id, front/back
complementarity, swap XOR-flip idempotence, tick advances
front_frame_id, concurrent read doesn't block write, byte
footprint > 0, two ticks render to DIFFERENT buffers (pointer
identity check confirms double-buffer is using both slots).
Acceptance:
cargo test --features splat3d --lib hpc::splat3d::frame → 10 passed
cargo test --features splat3d --lib hpc::splat3d → 86 passed
https://claude.ai/code/session_017GFLBnDy23AWBqvkbHHC411 parent 98d3f86 commit 5ea62e0
2 files changed
Lines changed: 411 additions & 0 deletions
0 commit comments