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
ARB_ubo/referenced-by-shader: pass if shader compiler moves UBOs between shaders
[piglit.git]
/
tests
/
spec
/
glsl-1.10
/
preprocessor
/
elif-2.shader_test
blob
b2e101837048b44f2c1628bdb1ce34b147ce6b50
1
[require]
2
GLSL >= 1.10
3
4
[fragment shader]
5
#define FOO 2
6
void main()
7
{
8
vec4 r = vec4(0.0, 0.0, 0.0, 0.0);
9
#if FOO == 1
10
r.y = 1.0;
11
#elif FOO == 2
12
r.x = 1.0;
13
#else
14
r.z = 1.0;
15
#endif
16
gl_FragColor = r;
17
}
18
19
20
[test]
21
draw rect -1 -1 2 2
22
relative probe rgba (0.5, 0.5) (1.0, 0.0, 0.0, 0.0)