Bug report and files:
https://github.com/mc-imperial/shader-compiler-bugs/issues/13
Fragment shader:
#version 440
void main(void)
{
vec4 A[2] = vec4[2](vec4(1.0), vec4((vec2(1.0) * mat2(1.0)).x));
int x = 1;
vec4 y = vec4(A[x].z);
}
Link error log:
Fragment info
-------------
0(7) : error C1059: non constant expression in initialization
Note that the shader is accepted by glslangValidator.
- 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.