summaryrefslogtreecommitdiff
path: root/tests/spec/glsl-es-1.00/compiler/const-initializer/from-sequence-in-function.vert
blob: ffebd6bac2f9a0482f41a4b94f3fc38d7358ff9c (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
25
26
#version 100

/* [config]
 * expect_result: pass
 * glsl_version: 1.00
 * [end config]
 *
 * Section 5.10 (Constant Expressions) of the GLSL ES 1.00.17 spec says:
 *
 *     "A constant expression is one of
 *
 *         ...
 *
 *         - a built-in function call whose arguments are all constant
 *           expressions, with the exception of the texture lookup functions."
 *
 * While the sequence operator is specifically disallowed as a constant
 * expression in GLSL ES 3.0 and later, it is allowed in GLSL ES 1.00.
 */

const float f = cos((1.0, 2.0));

void main()
{
    gl_Position = vec4(f);
}