MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / compilePasses

Method compilePasses

Source/Falcor/RenderGraph/RenderGraphCompiler.cpp:443–479  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

441}
442
443void RenderGraphCompiler::compilePasses(RenderContext* pRenderContext)
444{
445 while (1)
446 {
447 std::string log;
448 bool success = true;
449 for (auto& p : mExecutionList)
450 {
451 try
452 {
453 p.pPass->compile(pRenderContext, prepPassCompilationData(p));
454 }
455 catch (const std::exception& e)
456 {
457 log += std::string(e.what()) + "\n";
458 success = false;
459 }
460 }
461
462 if (success)
463 return;
464
465 // Retry
466 bool changed = false;
467 for (auto& p : mExecutionList)
468 {
469 auto newR = p.pPass->reflect(prepPassCompilationData(p));
470 if (newR != p.reflector)
471 {
472 p.reflector = newR;
473 changed = true;
474 }
475 }
476
477 FALCOR_CHECK(changed, "Graph compilation failed:\n{}", log);
478 }
479}
480} // namespace Falcor

Callers 1

compileMethod · 0.80

Calls 4

stringFunction · 0.85
whatMethod · 0.80
compileMethod · 0.45
reflectMethod · 0.45

Tested by

no test coverage detected