1 # Test that constant array indexing of gs input arrays is bounds checked at link
6 GL_ARB_geometry_shader4
11 attribute vec4 vertex;
13 varying float gs_input[4];
17 for (int i = 0; i < 4; i++)
24 #extension GL_ARB_geometry_shader4: enable
26 varying in float gs_input[][4];
28 varying out float gs_out;
32 /* This sould fail at link time once the size of the outer dimension of
33 * gs_input (3) is known.
35 float s = gs_input[3][0];
37 for (int i = 0; i < gl_VerticesIn; i++) {
40 gl_Position = gl_PositionIn[i];
46 input type GL_TRIANGLES
47 output type GL_TRIANGLE_STRIP
53 const int gs_VerticesIn = 3;
59 gl_FragColor = vec4(gs_out);