Closed jiradeto closed 5 years ago
This is yet another function from <metal_graphics>
that doesn't have a scalar overload. At this point, I think we should just add scalar versions of all those functions.
Ye ... I was doing a pass over the builtin functions a few days ago, but somehow forgot to check if this function also had this weird scalar-only restriction. Guess it's time to go over all functions one by one and see what works and what doesn't.
On MacOS 10.14, when using the variable identifier as the parameter of the built-in function
faceforward
, the MSL compiler gives the following error:The GLSL fragment shader:
MSL obtained by SPIRV-Cross:
Versions:
Steps to reproduce:
glslangValidator -V sample.frag -o sample.spv
spirv-val sample.spv
spirv-cross --msl sample.spv --output result.msl
xcrun --sdk macosx10.14 metal -x metal -std=macos-metal1.2 result.msl
This Archive.zip contains the original fragment shader, the associated SPIR-V, and MSL shader.
Issue found using GraphicsFuzz.