| 705 | } |
| 706 | |
| 707 | crg::Attachment const * buildSsaoPass( test::TestCounts & testCounts |
| 708 | , crg::Attachment const & lda |
| 709 | , crg::FrameGraph & graph ) |
| 710 | { |
| 711 | auto lp = graph.createImage( test::createImage( "lp", crg::PixelFormat::eR32_SFLOAT, 4u ) ); |
| 712 | auto m0v = graph.createView( test::createView( "m0v", lp, crg::PixelFormat::eR32_SFLOAT, 0u ) ); |
| 713 | auto & ssaoLinearisePass = graph.createPass( "ssaoLinearisePass" |
| 714 | , [&testCounts]( crg::FramePass const & framePass |
| 715 | , crg::GraphContext & context |
| 716 | , crg::RunnableGraph & runGraph ) |
| 717 | { |
| 718 | return createDummy( testCounts |
| 719 | , framePass, context, runGraph, crg::PipelineStageFlags::eFragmentShader ); |
| 720 | } ); |
| 721 | ssaoLinearisePass.addInputSampled( lda, 0 ); |
| 722 | auto m0a = ssaoLinearisePass.addOutputColourTarget( m0v ); |
| 723 | |
| 724 | auto m1v = graph.createView( test::createView( "m1v", lp, crg::PixelFormat::eR32_SFLOAT, 1u ) ); |
| 725 | auto & ssaoMinifyPass1 = graph.createPass( "ssaoMinifyPass1" |
| 726 | , [&testCounts]( crg::FramePass const & framePass |
| 727 | , crg::GraphContext & context |
| 728 | , crg::RunnableGraph & runGraph ) |
| 729 | { |
| 730 | return createDummy( testCounts |
| 731 | , framePass, context, runGraph, crg::PipelineStageFlags::eFragmentShader ); |
| 732 | } ); |
| 733 | ssaoMinifyPass1.addInputSampled( *m0a, 0 ); |
| 734 | auto m1a = ssaoMinifyPass1.addOutputColourTarget( m1v ); |
| 735 | |
| 736 | auto m2v = graph.createView( test::createView( "m2v", lp, crg::PixelFormat::eR32G32B32_SFLOAT, 2u ) ); |
| 737 | auto & ssaoMinifyPass2 = graph.createPass( "ssaoMinifyPass2" |
| 738 | , [&testCounts]( crg::FramePass const & framePass |
| 739 | , crg::GraphContext & context |
| 740 | , crg::RunnableGraph & runGraph ) |
| 741 | { |
| 742 | return createDummy( testCounts |
| 743 | , framePass, context, runGraph, crg::PipelineStageFlags::eFragmentShader ); |
| 744 | } ); |
| 745 | ssaoMinifyPass2.addInputSampled( *m1a, 0 ); |
| 746 | auto m2a = ssaoMinifyPass2.addOutputColourTarget( m2v ); |
| 747 | |
| 748 | auto m3v = graph.createView( test::createView( "m3v", lp, crg::PixelFormat::eR32G32B32_SFLOAT, 3u ) ); |
| 749 | auto & ssaoMinifyPass3 = graph.createPass( "ssaoMinifyPass3" |
| 750 | , [&testCounts]( crg::FramePass const & framePass |
| 751 | , crg::GraphContext & context |
| 752 | , crg::RunnableGraph & runGraph ) |
| 753 | { |
| 754 | return createDummy( testCounts |
| 755 | , framePass, context, runGraph, crg::PipelineStageFlags::eFragmentShader ); |
| 756 | } ); |
| 757 | ssaoMinifyPass3.addInputSampled( *m2a, 0 ); |
| 758 | auto m3a = ssaoMinifyPass3.addOutputColourTarget( m3v ); |
| 759 | |
| 760 | auto rs = graph.createImage( test::createImage( "rs", crg::PixelFormat::eR32_SFLOAT ) ); |
| 761 | auto rsv = graph.createView( test::createView( "rsv", rs, crg::PixelFormat::eR32_SFLOAT ) ); |
| 762 | auto & ssaoRawPass = graph.createPass( "ssaoRawPass" |
| 763 | , [&testCounts]( crg::FramePass const & framePass |
| 764 | , crg::GraphContext & context |
no test coverage detected