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
/
loops
/
glsl-fs-loop-gt.shader_test
blob
83755b460a9b370ed33b4cd784e98998a7d88795
1
[require]
2
GLSL >= 1.10
3
4
[vertex shader]
5
void main()
6
{
7
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
8
}
9
10
[fragment shader]
11
void main()
12
{
13
float sum;
14
vec3 c = vec3(0.0);
15
for(sum = 10.0; sum > 4.5; sum -= 1.0){
16
c.x += 0.1;
17
}
18
for(sum = 10.0; sum > 5.0; sum -= 1.0){
19
c.y += 0.1;
20
}
21
for(sum = 10.0; sum > 5.5; sum -= 1.0){
22
c.z += 0.1;
23
}
24
gl_FragColor = vec4(c, 1.0);
25
}
26
27
[test]
28
draw rect -1 -1 2 2
29
probe rgb 1 1 0.6 0.5 0.5