| 1224 | TYPED_TEST_SUITE( RenderGraphT, ParamTypes, ParamTypeNames ); |
| 1225 | |
| 1226 | TYPED_TEST( RenderGraphT, Render ) |
| 1227 | { |
| 1228 | static constexpr bool EnableDepthPrepass = TypeParam::EnableDepthPrepassT; |
| 1229 | static constexpr bool EnableOpaque = TypeParam::EnableOpaqueT; |
| 1230 | static constexpr bool EnableSsao = TypeParam::EnableSsaoT; |
| 1231 | static constexpr bool EnableTransparent = TypeParam::EnableTransparentT; |
| 1232 | testBegin( "testRender" |
| 1233 | + ( EnableDepthPrepass ? std::string{ "Prepass" } : std::string{} ) |
| 1234 | + ( EnableOpaque ? std::string{ "Opaque" } : std::string{} ) |
| 1235 | + ( EnableSsao ? std::string{ "Ssao" } : std::string{} ) |
| 1236 | + ( EnableTransparent ? std::string{ "Transparent" } : std::string{} ) ) |
| 1237 | crg::ResourceHandler handler; |
| 1238 | crg::FrameGraph graph{ handler, testCounts.testName }; |
| 1239 | auto d = graph.createImage( test::createImage( "d", crg::PixelFormat::eD32_SFLOAT_S8_UINT ) ); |
| 1240 | auto dtv = graph.createView( test::createView( "dtv", d, crg::PixelFormat::eD32_SFLOAT_S8_UINT ) ); |
| 1241 | auto ld = graph.createImage( test::createImage( "ld", crg::PixelFormat::eR32_SFLOAT ) ); |
| 1242 | auto ldv = graph.createView( test::createView( "ldv", ld, crg::PixelFormat::eR32_SFLOAT ) ); |
| 1243 | crg::Attachment const * dta{}; |
| 1244 | crg::Attachment const * lda{}; |
| 1245 | |
| 1246 | if constexpr ( EnableDepthPrepass ) |
| 1247 | { |
| 1248 | auto & depthPrepass = graph.createPass( "depthPrepass" |
| 1249 | , [&testCounts]( crg::FramePass const & framePass |
| 1250 | , crg::GraphContext & context |
| 1251 | , crg::RunnableGraph & runGraph ) |
| 1252 | { |
| 1253 | return createDummy( testCounts |
| 1254 | , framePass, context, runGraph, crg::PipelineStageFlags::eFragmentShader ); |
| 1255 | } ); |
| 1256 | lda = depthPrepass.addOutputColourTarget ( ldv ); |
| 1257 | dta = depthPrepass.addOutputDepthTarget ( dtv ); |
| 1258 | } |
| 1259 | |
| 1260 | auto o = graph.createImage( test::createImage( "o", crg::PixelFormat::eR16G16B16A16_SFLOAT ) ); |
| 1261 | auto otv = graph.createView( test::createView( "otv", o, crg::PixelFormat::eR16G16B16A16_SFLOAT ) ); |
| 1262 | |
| 1263 | if constexpr ( EnableOpaque ) |
| 1264 | { |
| 1265 | auto v = graph.createImage( test::createImage( "v", crg::PixelFormat::eR16G16B16A16_SFLOAT ) ); |
| 1266 | auto vv = graph.createView( test::createView( "vv", v, crg::PixelFormat::eR16G16B16A16_SFLOAT ) ); |
| 1267 | auto dca = buildDeferred< EnableSsao >( testCounts |
| 1268 | , lda |
| 1269 | , dta |
| 1270 | , ldv |
| 1271 | , dtv |
| 1272 | , vv |
| 1273 | , graph ); |
| 1274 | |
| 1275 | if constexpr ( EnableTransparent ) |
| 1276 | { |
| 1277 | auto wbcsa = buildWeightedBlended( testCounts |
| 1278 | , dta |
| 1279 | , lda |
| 1280 | , dtv |
| 1281 | , graph ); |
| 1282 | auto & finalCombinePass = graph.createPass( "finalCombinePass" |
| 1283 | , [&testCounts]( crg::FramePass const & framePass |
nothing calls this directly
no test coverage detected