Closed jiradeto closed 5 years ago
The problem is that OpOuterProduct
itself is not supported by the MSL backend. It winds up delegating back to the GLSL backend, which emits a call to outerProduct()
, which doesn't exist in MSL. I don't think there's anything in the Metal standard library that corresponds directly to this, which is part of why it's unimplemented. The other part is, I suspect that this operation is fairly rare, so it hasn't come up before.
Right, I don't think it's implemented at all in MSL yet, I thought it was, but I guess we didn't have any test coverage for it. Should be easy to add though. I'll get to it on Monday.
On MacOS 10.14, I tried to convert SPIR-V to MSL and found an issue that when using the unpackUnorm4x8 as the argument of the outerProduct function, the MSL compiler gives the following error:
The GLSL fragment shader:
MSL obtained by SPIRV-Cross:
Versions:
Steps to reproduce:
Note that before running SPIRV-Cross, I also used spirv-val to check that the SPIR-V produced by glslangValidator is valid.
This Archive.zip contains the original fragment shader, the associated SPIR-V, and MSL shader.
Issue found using GraphicsFuzz.