aboutsummaryrefslogtreecommitdiff
path: root/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-variable-index-implicit-size-global.vert
blob: e4527b16d21d99602ff5df4ebffa14775ff625d5 (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: fail
 * glsl_version: 1.20
 * glsles_version: 1.00
 * [end config]
 *
 * From page 19 (page 25 of the PDF) of the GLSL 1.20 spec:
 *
 *     "If an array is indexed with an expression that is not an integral
 *     constant expression, or if an array is passed as an argument to a
 *     function, then its size must be declared before any such use."
 */


/* Assume the array is sized in a different compilation unit.
 */
vec4 [] an_array;

uniform int i;

void main()
{
  gl_Position = an_array[i];
}