Expand description
The render pass (docs/ARCHITECTURE.md §七): every solved placement of every frame resolved to its final canvas
and pose, checked against the frames either side of it, and painted into the tile cache by the Compositor.
A RenderSession holds what the pass keeps for its whole length: the region table, the attachment chain, a
three-slot frame ring (previous, current, lookahead), the world-consistency mask, the last-painted pixels of every
fixed region, the last placement of every layer, a four-slot window over solve’s voting records, and the canvas
metadata the pass updates. The host drives it one frame at a time:
RenderSession::wanted_votesnames theconsistency/<frame>records the window does not hold yet; the host reads them and hands them toRenderSession::beginwith the frame’s plan and its neighbours’ plans.RenderSession::stepruns the frame’s placements in order until it needs something only the host has: a canvas’s stored metadata (RenderStep::NeedMeta→RenderSession::provide_meta), a decoded frame’s pixels (RenderStep::NeedFrame→ write them intoRenderSession::frame_slot), a tile or a canvas’s temporal records (the compositor’s own needs, passed through), and returnsRenderStep::Donewith the frame’s observation row once every placement is through.RenderSession::take_eventsafter every step (also a failed one) returns the diagnostics raised so far, in emission order;RenderSession::take_dirty_metason the host’s flush cadence returns the canvases whose metadata changed since the last flush, in first-changed order.
The session borrows the tile cache, the compositor and the pose graph for each step (a RenderIo); it owns none
of them, so the host keeps flushing tiles and temporal records exactly as before. It reads no clock: now comes
with every step and only stamps the tiles it writes.
Frames enter the ring only when a placement first needs them, and a new frame takes the slot filled longest ago among those holding none of the frame in progress and its two neighbours. A placement keeps the slots it was given while it loads the frames it still lacks, so a slot one of them holds must not be reused. After two frames that paint nothing, the next frame t loads itself before frame t−1; reusing plainly the slot filled longest ago then put frame t+2 into frame t’s slot while frame t+1 still compared against it, so frame t+1’s mask read frame t+2’s pixels in frame t’s place.
Re-exports§
pub use crate::engine::solve::is_valid_pose;pub use crate::engine::solve::POSE_BOUND;
Structs§
- Canvas
Meta - The fields of a canvas’s stored metadata (
canvas/<id>) the render pass updates; the host keeps the rest of the row and writes these back into it. - Consistency
Vote - Solve’s displacement-spread verdict for one region of one frame (
consistency/<frame>, docs/ARCHITECTURE.md §七): the analysis-resolution box it scored and two bitsets over it, LSB first — cells found inconsistent, cells found confidently consistent. - Frame
Input - What the host knows about one frame when it composites it.
- Frame
Outcome - What a finished frame leaves the host: its ledger row, and the canvas of the last moving-region placement it painted or reused (the progress event’s canvas), if any.
- Frame
Plan - What render reads of a stored plan.
- Observation
- The
observation/<frame>row. - Plan
Placement - One placement of a stored plan (
plan/<frame>), in the row’s field order.skipandocclusionsare absent from the row unless set, and stay absent in the observation row built from it. - Render
Config - Run-wide constants of a session.
- Render
Counters - The pass-level counters a step changes, cumulative over the session.
- Render
Decision - One placement’s line in the observation ledger (
observation/<frame>): the canvas it targeted, its final render-time placement, and either its pixel contribution or which shortcut skipped painting it. - Render
Io - What the session borrows for one step.
- Render
Region - One region of the run’s atlas.
- Render
Session
Enums§
Constants§
- RING_
FRAMES - Frames the ring holds: the previous, the current and the lookahead frame.
- VOTING_
WINDOW - Voting records the window keeps: a frame and both neighbours, plus one, so consecutive frames read one new record each.
Type Aliases§
- Consistency
Record - One frame’s
consistency/<frame>record, by region id.