MCPcopy Create free account
hub / github.com/DragonJoker/RenderGraph / buildGraph

Function buildGraph

source/RenderGraph/GraphBuilder.cpp:631–650  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

629 //*********************************************************************************************
630
631 void buildGraph( AttachmentArray const & endPoints
632 , RootNode & root
633 , GraphNodePtrArray & graph
634 , bool separateDepthStencilLayouts )
635 {
636 // First generate the graph with all transitions and links.
637 AttachmentTransitions transitions;
638 for ( auto endPoint : endPoints )
639 graph::traverseAttachmentPasses( root, endPoint, nullptr, transitions, graph );
640
641 // Then remove the shortcuts (if pass C depends on A and B, if B depends on A, then remove link between A and C)
642 graph::removeShortcuts( root );
643
644 // Now sort the graph nodes regarding their position in the final graph.
645 graph::sortNodes( root, graph );
646
647 // Eventually parse the sorted nodes to generate a curated transitions list per node.
648 graph::AttachmentStates states{ separateDepthStencilLayouts };
649 graph::buildTransitions( graph, states );
650 }
651
652 //*********************************************************************************************
653}

Callers 1

compileMethod · 0.85

Calls 4

traverseAttachmentPassesFunction · 0.85
removeShortcutsFunction · 0.85
sortNodesFunction · 0.85
buildTransitionsFunction · 0.85

Tested by

no test coverage detected