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