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-const-builtin-degrees.shader_test
blob
d33c9176e0e121f4a4959cca8804a7bc461e95c3
1
[require]
2
GLSL >= 1.20
3
4
[vertex shader]
5
void main()
6
{
7
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
8
}
9
10
[fragment shader]
11
void main() {
12
const int x = int(degrees(3.1415926535));
13
if (x == 180)
14
gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
15
else
16
gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
17
}
18
19
[test]
20
draw rect -1 -1 2 2
21
probe all rgb 0.0 1.0 0.0