Expand description
The solve pass as a session the host drives frame by frame: per-region tracking (odometry, anchor re-acquisition, drift control, relocalization, fragments), keyframes and revisits, fragment attachment, the pose graph’s nodes and edges, displacement-spread consistency voting, and each frame’s placements.
The session keeps what the TypeScript pass kept in memory: per-region state, the previous frame’s pixels,
analysis gray and features, the previous plan’s placements, the attachments, the canvases it created, the pose
graph, the keyframe index’s postings and the voting ring. Keyframes themselves are rows the host stores
(keyframe/<id>) and reads back: a revisit search is declare-then-provide (Poll::NeedKeyframes →
SolveSession::provide_keyframes).
One frame:
SolveSession::begin_framewith the frame’s scan record. A duplicate frame whose previous plan can be replayed is finished right there (Begin::Duplicate); otherwise the session asks for the pixels.- The host writes the RGBA frame into
SolveSession::frame_mutand callsSolveSession::run_framewith the analysis gray it computed (WebGPU) orNone, and the frame’s stored features orNone. - While the result is
Poll::NeedKeyframes, the host loads those rows and callsSolveSession::provide_keyframes. Poll::Donecarries the placements and finalised voting records. Before each poll result, and after an error, the host takes the frame’sEffects (SolveSession::take_effects) and applies them in order: they are the rows and diagnostics the pass produced, in the order it produced them.
After the last frame the host drains the voting ring (SolveSession::drain_voting) and relaxes the pose
graph (SolveSession::graph_mut), a few sweeps per step.
Structs§
- Canvas
Meta - One
canvas/<id>row as the solve pass writes it; every count the render pass fills in starts at zero. - Frame
Done - A solved frame.
- KeyPatch
- Native luma texture sampled around a keyframe feature.
- Keyframe
- One
keyframe/<id>row. - Placement
- One region’s observation in a frame (a placement of
plan/<frame>). - Plane
- A row-major 8-bit plane.
- Scan
Fields - The scan record fields the pass reads.
- Solve
Config - Solve
Region - One non-ignored region the pass tracks.
- Solve
Session - Voting
Record - One finalised frame of the voting ring (a
consistency/<frame>row when it has verdicts). - Voting
Verdict - One region slot’s finalised voting verdict: the analysis box it covers and its two LSB-first bitsets.
Enums§
- Begin
- The outcome of
SolveSession::begin_frame. - Effect
- Something the pass did that the host must carry out, in order.
- Poll
- Solve
Error
Constants§
- FALLBACK_
FEATURES - Features extracted from a frame whose stored features are missing.
- PATCH_
COUNT - Native patches a moving region’s keyframe keeps, and their side.
- PATCH_
SIZE - POSE_
BOUND - How far a pose may reach: the compositor’s addressable range less a margin larger than any frame.
- VOTING_
RING_ BYTES - Bytes of analysis frames the consistency voting ring keeps (docs/ARCHITECTURE.md §七).
Functions§
- is_
valid_ pose - Whether
(x, y)is a pose the pass may write: finite and insidePOSE_BOUND.
Type Aliases§
- Fragment
Scale - The cause a new fragment’s diagnostic names: a magnification change (
scale,error), or none.