| 1029 | |
| 1030 | template< bool EnableSsao > |
| 1031 | crg::Attachment const * buildDeferred( test::TestCounts & testCounts |
| 1032 | , crg::Attachment const *& lda |
| 1033 | , crg::Attachment const *& dta |
| 1034 | , crg::ImageViewId const & ldv |
| 1035 | , crg::ImageViewId const & dtv |
| 1036 | , crg::ImageViewId const & vtv |
| 1037 | , crg::FrameGraph & graph ) |
| 1038 | { |
| 1039 | auto d1 = graph.createImage( test::createImage( "d1", crg::PixelFormat::eR32G32B32A32_SFLOAT ) ); |
| 1040 | auto d1v = graph.createView( test::createView( "d1v", d1, crg::PixelFormat::eR32G32B32A32_SFLOAT ) ); |
| 1041 | auto d2 = graph.createImage( test::createImage( "d2", crg::PixelFormat::eR16G16B16A16_SFLOAT ) ); |
| 1042 | auto d2v = graph.createView( test::createView( "d2v", d2, crg::PixelFormat::eR16G16B16A16_SFLOAT ) ); |
| 1043 | auto d3 = graph.createImage( test::createImage( "d3", crg::PixelFormat::eR16G16B16A16_SFLOAT ) ); |
| 1044 | auto d3v = graph.createView( test::createView( "d3v", d3, crg::PixelFormat::eR16G16B16A16_SFLOAT ) ); |
| 1045 | auto d4 = graph.createImage( test::createImage( "d4", crg::PixelFormat::eR16G16B16A16_SFLOAT ) ); |
| 1046 | auto d4v = graph.createView( test::createView( "d4v", d4, crg::PixelFormat::eR16G16B16A16_SFLOAT ) ); |
| 1047 | auto & geometryPass = graph.createPass( "geometryPass" |
| 1048 | , [&testCounts]( crg::FramePass const & framePass |
| 1049 | , crg::GraphContext & context |
| 1050 | , crg::RunnableGraph & runGraph ) |
| 1051 | { |
| 1052 | return createDummy( testCounts |
| 1053 | , framePass, context, runGraph, crg::PipelineStageFlags::eFragmentShader ); |
| 1054 | } ); |
| 1055 | |
| 1056 | auto d1a = geometryPass.addOutputColourTarget( d1v ); |
| 1057 | auto d2a = geometryPass.addOutputColourTarget( d2v ); |
| 1058 | auto d3a = geometryPass.addOutputColourTarget( d3v ); |
| 1059 | auto d4a = geometryPass.addOutputColourTarget( d4v ); |
| 1060 | if ( !lda ) |
| 1061 | lda = geometryPass.addOutputColourTarget( ldv ); |
| 1062 | geometryPass.addOutputColourTarget( vtv ); |
| 1063 | if ( dta ) |
| 1064 | geometryPass.addInputDepthStencilTarget( *dta ); |
| 1065 | else |
| 1066 | dta = geometryPass.addOutputDepthStencilTarget( dtv ); |
| 1067 | |
| 1068 | auto df = graph.createImage( test::createImage( "df", crg::PixelFormat::eR32G32B32_SFLOAT ) ); |
| 1069 | auto dfv = graph.createView( test::createView( "dfv", df, crg::PixelFormat::eR32G32B32_SFLOAT ) ); |
| 1070 | auto sp = graph.createImage( test::createImage( "sp", crg::PixelFormat::eR32G32B32_SFLOAT ) ); |
| 1071 | auto spv = graph.createView( test::createView( "spv", sp, crg::PixelFormat::eR32G32B32_SFLOAT ) ); |
| 1072 | auto & lightingPass = graph.createPass( "lightingPass" |
| 1073 | , [&testCounts]( crg::FramePass const & framePass |
| 1074 | , crg::GraphContext & context |
| 1075 | , crg::RunnableGraph & runGraph ) |
| 1076 | { |
| 1077 | return createDummy( testCounts |
| 1078 | , framePass, context, runGraph, crg::PipelineStageFlags::eFragmentShader ); |
| 1079 | } ); |
| 1080 | lightingPass.addInputSampled( *lda, 0 ); |
| 1081 | lightingPass.addInputSampled( *d1a, 1 ); |
| 1082 | lightingPass.addInputSampled( *d2a, 2 ); |
| 1083 | lightingPass.addInputSampled( *d3a, 3 ); |
| 1084 | lightingPass.addInputSampled( *d4a, 4 ); |
| 1085 | auto dfa = lightingPass.addOutputColourTarget( dfv ); |
| 1086 | auto spa = lightingPass.addOutputColourTarget( spv ); |
| 1087 | |
| 1088 | auto of = graph.createImage( test::createImage( "of", crg::PixelFormat::eR32G32B32_SFLOAT ) ); |
nothing calls this directly
no test coverage detected