1 # This test checks that when ARB_arrays_of_arrays is supported, the
2 # geometry shader can pass all of gl_ClipDistanceIn to a function.
7 GL_ARB_geometry_shader4
8 GL_ARB_arrays_of_arrays
15 out float offset_to_gs;
16 out float gl_ClipDistance[gl_MaxClipDistances];
21 offset_to_gs = offset;
22 for (int i = 0; i < gl_MaxClipDistances; i++) {
23 gl_ClipDistance[i] = offset + float(i);
29 #extension GL_ARB_geometry_shader4: enable
31 in float offset_to_gs[3];
32 in float gl_ClipDistanceIn[3][gl_MaxClipDistances];
33 flat out int ok_to_fs;
35 bool test(float clip_distance_copy[3][gl_MaxClipDistances])
39 for (int i = 0; i < 3; i++) {
40 for (int j = 0; j < gl_MaxClipDistances; j++) {
41 if (clip_distance_copy[i][j] != offset_to_gs[i] + float(j))
51 bool ok = test(gl_ClipDistanceIn);
52 for (int i = 0; i < 3; i++) {
53 gl_Position = gl_PositionIn[i];
60 input type GL_TRIANGLES
61 output type GL_TRIANGLE_STRIP
72 gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
74 gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
78 vertex/float/2 offset/float/1
85 draw arrays GL_TRIANGLE_FAN 0 4
86 probe all rgba 0.0 1.0 0.0 1.0