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
14mod alias;
15mod builder;
16mod compile;
17mod frame;
18mod passes;
19mod transient;
20mod types;
21mod validate;
22mod view_mask;
23
24pub(crate) use builder::GraphBuilder;
25pub(crate) use compile::GraphError;
26pub use compile::{CompiledGraph, CompiledPass, CompiledResource};
27pub use frame::{FOG_FROXEL_X, FOG_FROXEL_Y, FOG_FROXEL_Z, FrameGraphInputs, build_frame_graph};
28pub use passes::{PASS_COUNT, PASS_NAMES, PassId};
29pub use transient::{
30    PoolGates, TransientSlot, TransientTexture, assert_slot_aliasing_sound, plan_pool_slots, pooled,
31};
32pub use types::{
33    BarrierOp, BufferUsage, ClearValue, GraphResourceClass, PassKind, PixelFormat, ReadStages,
34    ResourceId, ResourceState, TextureDesc, TextureHandle, TextureUsage,
35};
36pub(crate) use types::{BufferDesc, TextureSize, full_mip_levels};
37pub use validate::{barrier_coverage_gaps_for_driven, final_states};
38pub use view_mask::apply_view;