aboutsummaryrefslogtreecommitdiff
path: root/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-length-implicit-size.vert
blob: b5bafa755bfc348a9f6c3d0d9404591d86d40812 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* [config]
 * expect_result: fail
 * glsl_version: 1.20
 * glsles_version: 1.00
 * [end config]
 *
 * From page 20 (page 26 of the PDF) of the GLSL 1.20 spec:
 *
 *     "The length method cannot be called on an array that has not been
 *     explicitly sized."
 */


void main()
{
	float b[];

	b[2] = 1.0;  // Implicitly size array to have at least 3 elements

	gl_Position = vec4(b.length());
}