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

Function gatherNextImageLayouts

source/RenderGraph/RunnableGraph.cpp:86–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84 }
85
86 static LayerLayoutStatesMap gatherNextImageLayouts( LayerLayoutStatesMap currentLayouts
87 , std::vector< RunnablePassPtr >::iterator nextPassIt
88 , std::vector< RunnablePassPtr >::iterator endIt )
89 {
90 LayerLayoutStatesMap result;
91
92 while ( !currentLayouts.empty()
93 && endIt != nextPassIt )
94 {
95 if ( auto const & nextPass = **nextPassIt;
96 nextPass.isEnabled() )
97 {
98 auto & nextLayouts = nextPass.getImageLayouts();
99 LayerLayoutStates layoutStates;
100 auto currIt = std::find_if( currentLayouts.begin()
101 , currentLayouts.end()
102 , [&nextLayouts, &layoutStates]( LayerLayoutStatesMap::value_type const & lookup )
103 {
104 layoutStates = mergeRanges( nextLayouts, lookup );
105 return !layoutStates.empty();
106 } );
107
108 if ( currIt != currentLayouts.end() )
109 {
110 result.try_emplace( currIt->first, layoutStates );
111 currentLayouts.erase( currIt );
112 }
113 }
114
115 ++nextPassIt;
116 }
117
118 return result;
119 }
120
121 static PipelineState getNextState( PipelineState currentState
122 , std::vector< RunnablePassPtr >::iterator nextPassIt

Callers 1

recordMethod · 0.85

Calls 5

mergeRangesFunction · 0.85
beginMethod · 0.80
eraseMethod · 0.80
isEnabledMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected