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
/
nested-if-1.shader_test
blob
15dd9c2ab7d5ae7f4a1693a14e55ce917bfbf3a0
1
[require]
2
GLSL >= 1.10
3
4
[fragment shader]
5
#define FOO 1
6
#define BAR 0
7
void main()
8
{
9
vec4 r = vec4(0.0, 0.0, 0.0, 0.0);
10
#if FOO == 1
11
#if BAR == 1
12
r.x = 1.0;
13
#else
14
r.y = 1.0;
15
#endif
16
#else
17
r.z = 1.0;
18
#endif
19
gl_FragColor = r;
20
}
21
22
23
[test]
24
draw rect -1 -1 2 2
25
relative probe rgba (0.5, 0.5) (0.0, 1.0, 0.0, 0.0)