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
glsl-array-bounds: set out-of-bounds array index inside shader
[piglit.git]
/
tests
/
shaders
/
glsl-function-prototype.shader_test
blob
f96920d0cec5a68368f72376c66a518c9e7d976f
1
[require]
2
GLSL >= 1.10
3
4
[vertex shader]
5
void main()
6
{
7
gl_Position = gl_Vertex;
8
}
9
10
[fragment shader]
11
12
// Function prototype:
13
float _half(float x);
14
15
void main()
16
{
17
float c = _half(0.8);
18
gl_FragColor = vec4(c);
19
}
20
21
float _half(float x)
22
{
23
return 0.5 * x;
24
}
25
26
27
[test]
28
draw rect -1 -1 2 2
29
probe rgba 1 1 0.4 0.4 0.4 0.4