mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-11-25 21:10:04 +00:00
[OPT] Add removed unused interface var pass to legalization passes (#5579)
DXC does not do a good job of recognizing which variables need to be on the entry point for which functions. This is because it does not want to have to walk the call tree to determine which instructions are reachable from which entry points. This is also useful if the same input variable gets used from two different shader, but the uses in one get optimized away. Will parially fix https://github.com/microsoft/DirectXShaderCompiler/issues/4621. Will not fix code compiled with -fcgl.
This commit is contained in:
parent
f9184c6501
commit
7604147c25
@ -167,6 +167,7 @@ Optimizer& Optimizer::RegisterLegalizationPasses(bool preserve_interface) {
|
||||
.RegisterPass(CreateDeadInsertElimPass())
|
||||
.RegisterPass(CreateReduceLoadSizePass())
|
||||
.RegisterPass(CreateAggressiveDCEPass(preserve_interface))
|
||||
.RegisterPass(CreateRemoveUnusedInterfaceVariablesPass())
|
||||
.RegisterPass(CreateInterpolateFixupPass())
|
||||
.RegisterPass(CreateInvocationInterlockPlacementPass());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user