KhronosGroup / KhronosGroup/SPIRV-Tools

CreateRemoveUnusedInterfaceVariablesPass removes variables even if preserve_interface=true

Open
#6,673 0 comments 0 reactions 1 assignee Claimed by @uwx View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.