Fix #287: pin down the io-array size before checking for out of range index.

This commit is contained in:
John Kessenich
2017-04-03 14:29:20 -06:00
parent 6f03bfc733
commit 2184c2f21a
4 changed files with 73 additions and 57 deletions

View File

@@ -8,7 +8,10 @@ out gl_PerVertex {
float gl_CullDistance[3];
};
layout(triangles) in;
void main()
{
gl_in[3].gl_Position; // ERROR, out of range
gl_CullDistance[2] = gl_in[1].gl_CullDistance[2];
}