aboutsummaryrefslogtreecommitdiff
path: root/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-length.vert
blob: 3399b199703aa0a40ee6d34c6b6e57a1f9feb5c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* [config]
 * expect_result: pass
 * glsl_version: 1.20
 * glsles_version: 1.00
 * [end config]
 *
 * From page 20 (page 26 of the PDF) of the GLSL 1.20 spec:
 *
 *     "Arrays know the number of elements they contain. This can be obtained
 *     by using the length method:
 *
 *         a.length(); // returns 5 for the above declarations
 *
 *     The length method cannot be called on an array that has not been
 *     explicitly sized."
 */


uniform vec4 a[2];

void main()
{
  gl_Position = vec4(a.length());
}