repo.or.cz
/
piglit.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
perf/pixel-rate: new pixel throughput microbenchmark
[piglit.git]
/
tests
/
spec
/
glsl-1.10
/
execution
/
nested-function-calls.shader_test
blob
a15d7af120d3f0ccab1c22dcc47b734967912151
1
[require]
2
GLSL >= 1.10
3
4
[fragment shader]
5
float Half(const in float x)
6
{
7
return 0.5 * x;
8
}
9
10
float square(const in float x)
11
{
12
return x * x;
13
}
14
15
void main()
16
{
17
float a = 0.5;
18
float b = square(Half(1.0));
19
gl_FragColor = vec4(b);
20
}
21
22
23
[test]
24
draw rect -1 -1 2 2
25
relative probe rgba (0.5, 0.5) (0.25, 0.25, 0.25, 0.25)