cl: Don't use device_infos if num_device_infos == 0
[piglit.git] / tests / shaders / glsl-vs-functions.vert
blobcdb023a9819c8ae2e1ec5b065d1064a43a739056
1 uniform vec4 args1;
3 /* In order to make the Mesa compiler not inline the function calls, have
4  * return statements inside of branches.
5  */
6 float f1(float f)
8         if (f > 0.5)
9                 return 1.0;
10         else
11                 return 0.0;
14 float f2(float f)
16         if (f < 0.5)
17                 return 1.0;
18         else
19                 return 0.0;
22 void main()
24         gl_FrontColor = vec4(f1(args1.x),
25                              f1(args1.y),
26                              f2(args1.z),
27                              f2(args1.w));
28         gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;