Bug report and files:
https://github.com/mc-imperial/shader-compiler-bugs/issues/14
Fragment shader:
#version 440
float foo(out vec3 p)
{
for(int c = 0; c < 6; ++ c) {
p = abs(p) +
vec3(1.0,
(false ? 1.0 : (false ? distance(1.0, 1.0) : 1.0)) + (true ? 0.1 : length(vec3(1.0))),
(true ? 1.0 : 1.0 - step(1.0, 1.0)) + 0.3
);
}
return 1.0;
}
void main(void)
{
vec3 v;
foo(v);
}
Link error log:
Fragment info
-------------
0(17) : error C1067: too little data in type constructor
0(17) : error C1067: too little data in type constructor
(0) : fatal error C9999: Can't convert to expr: 1, @TMP3 + 0.1f
Note that the shader is accepted by glslangValidator and works with a recent Intel driver.
- Operating system version.
Windows 10
- Graphics hardware.
GeForce GTX 770. Driver: 373.06
-
Reproducer project.
We have provided the fragment shader at the above link. -
Description of single steps to reproduce the problem.
Compile and link the fragment shader. -
Description of the expected result.
No link error.