mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-08 19:40:06 +00:00
only use dead input elimination on vertex shaders
It can't be safely used unilaterally on other stages, since that will result in output/input mismatches between stages. They arn't having their output variables eliminated accordingly.
This commit is contained in:
parent
b40f87f1d3
commit
d11c3ff315
@ -212,7 +212,8 @@ void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector
|
||||
optimizer.RegisterPass(spvtools::CreateInterpolateFixupPass());
|
||||
if (options->optimizeSize) {
|
||||
optimizer.RegisterPass(spvtools::CreateRedundancyEliminationPass());
|
||||
optimizer.RegisterPass(spvtools::CreateEliminateDeadInputComponentsPass());
|
||||
if (intermediate.getStage() == EShLanguage::EShLangVertex)
|
||||
optimizer.RegisterPass(spvtools::CreateEliminateDeadInputComponentsPass());
|
||||
}
|
||||
optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass());
|
||||
optimizer.RegisterPass(spvtools::CreateCFGCleanupPass());
|
||||
|
Loading…
Reference in New Issue
Block a user