]> git.tdb.fi Git - libs/gl.git/blob - tests/glsl/constant_condition_removal.glsl
Fix a bug in makefont.py if no ranges are given
[libs/gl.git] / tests / glsl / constant_condition_removal.glsl
1 const bool use_color = false;
2
3 #pragma MSP stage(vertex)
4 layout(location=0) in vec4 position;
5 layout(location=1) in vec4 color;
6 void main()
7 {
8         gl_Position = position;
9         passthrough;
10 }
11
12 #pragma MSP stage(fragment)
13 layout(location=0) out vec4 frag_color;
14 void main()
15 {
16         if(use_color)
17                 frag_color = color;
18         else
19                 frag_color = vec4(1.0);
20 }
21
22 /* Expected output: vertex
23 layout(location=0) in vec4 position;
24 void main()
25 {
26         gl_Position = position;
27 }
28 */
29
30 /* Expected output: fragment
31 layout(location=0) out vec4 frag_color;
32 void main()
33 {
34         frag_color = vec4(1.0);
35 }
36 */