[clang] [llvm] [clang][SPIR-V] Implement -fspv-preserve-interface (PR #196404)

Diego Novillo via cfe-commits cfe-commits at lists.llvm.org
Fri May 8 07:26:16 PDT 2026


dnovillo wrote:

> @dnovillo Can you take ownership of the corresponding issue, and provide a justification for the option? I forget why we needed it in DXC. Was it a Vulkan validation issue to avoid warnings for mismatches between stages? If we carry an option forward, I would like to make sure the reason for it is still valid. I had opened the issue as a placeholder with the intent of determining if it was still useful. I should have made that more explicit.

Well, I only ran into it because of [BigWheels](https://github.com/google/bigwheels). I couldn't get it to compile anything without the flag. I don't know whether this is a DXC feature that we definitely want to migrate. If it's not desirable to migrate this, I can just as easily adjust BigWheels's build setup. I haven't really done a survey on what other software packages may be using it. Anything that wants to do reflection?

> I believe the real issue is output variable that are never referenced. If a vertex shader has an output that is never written to, then it might be removed. If that variable at the same location is statically read in the fragment shader, it will not be removed. Then the validation layers will issue an error because of an interface mismatch.

I have a vague recollection of this being the case, yes.


https://github.com/llvm/llvm-project/pull/196404


More information about the cfe-commits mailing list