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

Method getCurrentLayoutState

source/RenderGraph/RunnableGraph.cpp:497–527  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

495 }
496
497 LayoutState RunnableGraph::getCurrentLayoutState( RecordContext & context
498 , ImageId image
499 , ImageViewType viewType
500 , ImageSubresourceRange range )const
501 {
502 auto result = context.getLayoutState( image, viewType, range );
503
504 if ( result.layout == ImageLayout::eUndefined )
505 {
506 // Lookup in graph's external inputs.
507 result = m_graph.getInputLayoutState( image, viewType, range );
508
509 if ( result.layout != ImageLayout::eUndefined )
510 {
511 context.setLayoutState( image, viewType, range, result );
512 }
513 }
514
515 if ( result.layout == ImageLayout::eUndefined )
516 {
517 // Lookup in graph's previous final state.
518 result = m_graph.getFinalLayoutState( image, viewType, range );
519
520 if ( result.layout != ImageLayout::eUndefined )
521 {
522 context.setLayoutState( image, viewType, range, result );
523 }
524 }
525
526 return result;
527 }
528
529 LayoutState RunnableGraph::getCurrentLayoutState( RecordContext & context
530 , ImageViewId view )const

Callers 3

prepareImageFunction · 0.80
doProcessImageViewMethod · 0.80
doCreateRenderPassMethod · 0.80

Calls 4

getInputLayoutStateMethod · 0.80
getLayoutStateMethod · 0.45
setLayoutStateMethod · 0.45
getFinalLayoutStateMethod · 0.45

Tested by

no test coverage detected