Open amerigomasini opened 5 years ago
This is likely a SPIRV-Cross bug, not a shaderc bug, since the actual translation logic is implemented there. Unless of course this is something that we are doing wrong when invoking spirv-cross. Sending dneto0 to triage, since he owns this side of the repo more. This might a good starter bug?
The following glsl function:
Yields this SPIR-V code:
Executing this function with the value
clip(vec4(-0.5, 1, 1, 1));
results in the fragment not being discarded, even though the x value is less than zero.If I rewrite the glsl function, to the logically equivalent:
It will yield this SPIR-V code:
Executing this new version of the function with the value
clip(vec4(-0.5, 1, 1, 1));
results in the fragment being discarded as expected.Is something wrong with the first glsl function, or is this something that should be corrected ?