aboutsummaryrefslogtreecommitdiff
path: root/tests/glslparsertest/glsl2/local-function-03.frag
blob: 1ee171c2545f1c43e6f4c9820de4180cabcc2590 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// [config]
// expect_result: pass
// glsl_version: 1.10
//
// # NOTE: Config section was auto-generated from file
// # NOTE: 'glslparser.tests' at git revision
// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
// [end config]

/* PASS - local function declarations are not allowed in GLSL 1.10. */
#version 110
void main() {
    float foo(float x);
    gl_FragColor = vec4(0.0, foo(0.5), 0.0, 1.0);
}

float foo(float x) {
    return x + 0.5;
}