]> git.tdb.fi Git - libs/gl.git/blob - tests/glsl/constant_ternary_removal.glsl
Check the flat qualifier from the correct member
[libs/gl.git] / tests / glsl / constant_ternary_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         frag_color = (use_color ? color : vec4(1.0));
17 }
18
19 // Target API: Vulkan
20
21 /* Expected output: vertex
22 layout(location=0) in vec4 position;
23 void main()
24 {
25         gl_Position = position;
26 }
27 */
28
29 /* Expected output: fragment
30 layout(location=0) out vec4 frag_color;
31 void main()
32 {
33         frag_color = vec4(1.0);
34 }
35 */