1 # This test checks that the GLSL compiler respects the size of
2 # gl_ClipDistanceIn when it is explicitly declared in the geometry
8 GL_ARB_geometry_shader4
12 out float gl_ClipDistance[2];
22 #extension GL_ARB_geometry_shader4: enable
24 in float gl_ClipDistanceIn[3][2];
25 flat out int outer_size;
26 flat out int inner_size;
30 for (int i = 0; i < 3; i++) {
31 gl_Position = gl_PositionIn[i];
32 outer_size = gl_ClipDistanceIn.length();
33 inner_size = gl_ClipDistanceIn[0].length();
39 input type GL_TRIANGLES
40 output type GL_TRIANGLE_STRIP
46 flat in int outer_size;
47 flat in int inner_size;
52 gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
53 else if (inner_size != 2)
54 gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
56 gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
67 draw arrays GL_TRIANGLE_FAN 0 4
68 probe all rgba 0.0 1.0 0.0 1.0