]> git.tdb.fi Git - libs/gl.git/blob - tests/glsl/complex_constant_condition_removal.glsl
Check the flat qualifier from the correct member
[libs/gl.git] / tests / glsl / complex_constant_condition_removal.glsl
1 const int lod = 1;
2 const int bias = 1;
3 const int threshold = 3;
4
5 #pragma MSP stage(vertex)
6 layout(location=0) in vec4 position;
7 layout(location=1) in vec4 color;
8 void main()
9 {
10         gl_Position = position;
11         passthrough;
12 }
13
14 #pragma MSP stage(fragment)
15 layout(location=0) out vec4 frag_color;
16 void main()
17 {
18         if(!(lod+bias>threshold))
19                 frag_color = color;
20         else
21                 frag_color = vec4(1.0);
22 }
23
24 // Target API: Vulkan
25
26 /* Expected output: vertex
27 layout(location=0) in vec4 position;
28 layout(location=1) in vec4 color;
29 layout(location=0) out vec4 _vs_out_color;
30 void main()
31 {
32         gl_Position = position;
33         _vs_out_color = color;
34 }
35 */
36
37 /* Expected output: fragment
38 layout(location=0) out vec4 frag_color;
39 layout(location=0) in vec4 _vs_out_color;
40 void main()
41 {
42         frag_color = _vs_out_color;
43 }
44 */