DirectXShaderCompiler icon indicating copy to clipboard operation
DirectXShaderCompiler copied to clipboard

[SPIR-V] Regression - Internal Compiler error: llvm::cast<X>() argument of incompatible type!

Open Fletterio opened this issue 1 year ago • 3 comments

I have a shader that was working on commit 71f2766 which would be DXC commit 0beaa76

It's no longer working after merging DXC d64d34c. It now throws the error in the title when trying to compile, so whatever broke it is somewhere inbetween.

Here's the Godbolt with a repro: https://godbolt.org/z/oKfvE9Mrj

Fletterio avatar Jul 28 '25 16:07 Fletterio

This was somehow caused by https://github.com/microsoft/DirectXShaderCompiler/pull/7353. @danbrown-amd Do you have any time to look into this?

s-perron avatar Aug 21 '25 14:08 s-perron

It comes from an assumption in CapabilityVisitor that if a SpirvInstruction has a barrier opcode, it must be a SpirvBarrier. In this case it is a SpirvIntrinsicInstruction. Working on a fix.

danbrown-amd avatar Aug 22 '25 00:08 danbrown-amd

Thank you both 🙏

Fletterio avatar Sep 15 '25 15:09 Fletterio