projects
/
platform
/
upstream
/
glslang.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge pull request #2892 from greg-lunarg/mb
[platform/upstream/glslang.git]
/
Test
/
forwardRef.frag
1
#version 110
2
3
uniform vec4 bigColor;
4
varying vec4 BaseColor;
5
uniform float d;
6
7
void bar();
8
float foo(vec4);
9
float unreachableReturn();
10
11
void main()
12
{
13
vec4 color = vec4(foo(BaseColor));
14
15
bar();
16
float f = unreachableReturn();
17
18
gl_FragColor = color * f;
19
}
20
21
void bar()
22
{
23
}
24
25
float unreachableReturn()
26
{
27
bar();
28
if (d < 4.2)
29
return 1.2;
30
else
31
return 4.5;
32
}
33
34
float foo(vec4 bar)
35
{
36
return bar.x + bar.y;
37
}