Expand description
single-pass compositing: CPU-pure frame render plan (vertex arenas + planned layers/batches). Frame render plan (single-pass compositing): pure CPU.
Given a frame’s layers + a PreparedResources snapshot, FrameRenderPlan::build_cpu
produces:
- vertex arenas (one
Vecper primitive type, accumulated for the whole frame), - planned layers (scissor / stencil_ref / clip params / stencil mask range),
- planned batches (pipeline + clip_bind + texture + vertex_range),
- isolated offscreen passes + composite batches (isolated compositor).
No [wgpu::Device] / [wgpu::Queue] / crate::text::TextAtlas /
crate::icons::IconCache access here. Tests can mock PreparedResources
and call build_cpu without a GPU.
The plan guarantees:
- arena ranges are stable for the whole frame (each batch has a
Range<u32>into a buffer that is uploaded once viacreate_buffer_init), - batch fusion never crosses a layer boundary,
- batch fusion requires identical
pipeline + clip_bind + texture + adjacency.
Structs§
- Frame
Render Plan - Whole-frame plan. Single owner of the per-frame vertex arenas + batches.
- Planned
Layer - One scene layer’s GPU state snapshot inside the frame.
Enums§
- Clip
Bind Kind - Which clip uniform group a batch uses (bind group 0).
- Frame
Plan Error - CPU planning error for isolated passes.
- Pipeline
Kind - Which CPU/GPU pipeline a batch targets.
- Planned
Batch - One draw call in the main or isolated plan.
- Texture
Bind Kind - Which texture bind group a batch uses (bind group 1).
Type Aliases§
- Isolated
Pass - Legacy alias: use
PlannedIsolatedPass.