Skip to main content

concinnity_render/render_graph/
mod.rs

1//! Backend-agnostic render graph. Types, builder, and compile pass with
2//! unit tests; the per-backend executors live alongside each backend
3//! (`metal/graph_exec.rs`, `vulkan/graph_exec.rs`, `directx/graph_exec.rs`)
4//! and consume the `CompiledGraph` this module produces.
5//!
6//! The graph deliberately stops short of allocating GPU resources; that
7//! stays backend-owned. The graph's job is to:
8//!
9//!   * give every pass a stable identity ([`PassId`]),
10//!   * track read / write declarations so the compile pass can derive
11//!     pass order, transient resource lifetimes, and per-pass barriers,
12//!   * surface a `CompiledGraph` the per-backend executor consumes.
13
14#![expect(
15    unused_imports,
16    reason = "the submodules re-export a shared vocabulary that no single consumer names in full"
17)]
18
19mod alias;
20mod builder;
21mod compile;
22mod frame;
23mod passes;
24mod transient;
25mod types;
26mod validate;
27mod view_mask;
28
29pub(crate) use alias::{AliasPlan, AliasSlot, plan_aliasing_for};
30pub(crate) use builder::{GraphBuilder, PassBuilder, ResourceVersion};
31pub(crate) use compile::GraphError;
32pub use compile::{CompiledGraph, CompiledPass, CompiledResource};
33pub use frame::{FOG_FROXEL_X, FOG_FROXEL_Y, FOG_FROXEL_Z, FrameGraphInputs, build_frame_graph};
34pub use passes::{PASS_COUNT, PASS_NAMES, PassId};
35pub use transient::{
36    PoolGates, TransientSlot, TransientTexture, assert_slot_aliasing_sound, plan_pool_slots, pooled,
37};
38pub(crate) use transient::{SlotConflict, plan_transient_slots, planning_inputs, slot_conflicts};
39pub use types::{
40    BarrierOp, BufferUsage, ClearValue, GraphResourceClass, PassKind, PixelFormat, ReadStages,
41    ResourceId, ResourceState, TextureDesc, TextureHandle, TextureUsage,
42};
43pub(crate) use types::{
44    BufferDesc, BufferHandle, PassRange, ResourceOrigin, TextureSize, full_mip_levels,
45};
46#[cfg(test)]
47pub(crate) use validate::barrier_coverage_gaps;
48pub(crate) use validate::{BarrierGap, GapKind};
49pub use validate::{barrier_coverage_gaps_for_driven, final_states};
50pub use view_mask::apply_view;