KhronosGroup / KhronosGroup/SPIRV-Tools
CreateRemoveUnusedInterfaceVariablesPass removes variables even if preserve_interface=true
Open
component:optimization
- Dominant language
- C++
- Stars
- 1.4k
- Forks
- 709
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 28
Description
CreateRemoveUnusedInterfaceVariablesPass was added to the HLSL->SPIRV optimization chain in 7604147 but does not respect `-fspv-preserve-interface` passed in. So the interface gets modified anyway, but only when the legalization passes are executed (if `needsLegalization = true`, see SpirvEmitter.cpp in clang). This causes a downstream issue in DXC (https://github.com/microsoft/DirectXShaderCompiler/issues/7982) and SDL_shadercross (https://github.com/libsdl-org/SDL_shadercross/issues/169)
Contributor guide
Assessment
This issue has not been assessed yet.