pub fn final_states(graph: &CompiledGraph) -> Vec<(ResourceState, ReadStages)>Expand description
The access each resource is left in once the graph’s last barrier for it has
run, indexed by resource id: the state plus the stage union that barrier
carried, since a Read’s native state can depend on its consuming stages.
(Undefined, empty) for a resource no barrier touches.
A backend pairs this with its own state translation to check the cross-frame contract: a resource whose first-use transition names a resting state must actually end the frame in it, or the next frame’s producer barrier declares a source state the resource is not in.