| 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 | } |
no test coverage detected