We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3291252 commit adfac1bCopy full SHA for adfac1b
Graphics/ShaderTools/src/ConvertUBOToPushConstant.cpp
@@ -543,6 +543,13 @@ std::vector<uint32_t> ConvertUBOToPushConstants(
543
544
optimizer.SetMessageConsumer(SPIRVToolsInternal::SpvOptimizerMessageConsumer);
545
546
+ // Inline all function calls to eliminate OpFunctionCall instructions
547
+ optimizer.RegisterPass(spvtools::CreateInlineExhaustivePass());
548
+
549
+ // Inlining tends to leave junk behind. You can clean it up
550
+ optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass());
551
+ optimizer.RegisterPass(spvtools::CreateEliminateDeadFunctionsPass());
552
553
// Register the pass to convert UBO to push constant using custom out-of-tree pass
554
optimizer.RegisterPass(ConvertUBOToPushConstantPass::Create(BlockName));
555
0 commit comments