Well, if it was easy to support other drivers, I'd have done it ages ago. These issues are insanely hard to debug (or straight-up impossible in case of closed-source drivers) and even the information you gave doesn't really tell me anything. Unless there's a way to find out which SPIR-V instruction in the source shader causes the error, there's nothing I can do.
How did you get amdvlk to display those messages at all? I've tried various things and even with a debug build, it just exits the application without any sort of information on what is actually wrong.
Anyway, I talked to vkd3d devs and apparently their plan is to make their shader compiler a standalone library at some point. Once that happens I might start using it for dxvk as well.
Well there are some "SampledImage" strings in dxvk, so I thought you might be using them while building SPIR-V (functions?) somehow. I'll admit my understanding about how things work here in general is still poor.
To get amdvlk output, I had to patch report_fatal_error() in amdvlk/drivers/llvm/lib/Support/ErrorHandling.cpp to ignore any registered callbacks and always write to stderr.
SampledImage is a thing in SPIR-V, but ultimately I still don't know under which circumstances this is problematic and why, and if it is OpSampledImage itself that causes the issue or a consumer of that instruction.
Also, with the error occuring deep down in LLVM rather than an earlier stage, a lot of noise is added while relevant information may be lost. A "function" could be anything in this context.
Might be a driver bug, reported this here: https://github.com/GPUOpen-Drivers/xgl/issues/5
This particular issue should be fixed when applying GPUOpen-Drivers/xgl#6.
Nothing extracted yet.
I think it would useful to get open amdvlk working for comparisons against radv. It currently fails while handling SPIRV while running witness trace:
Here is a snip from amdvlk icd/api/llpc/translator/SPIRVUtil.cpp , it looks like it doesn't like some type mismatch: