glsl-array-bounds: set out-of-bounds array index inside shader
[piglit.git] / tests / shaders / glsl-const-builtin-normalize.shader_test
blobc94179171ecf9d5891780f2b97a6671f82cf942c
1 [require]
2 GLSL >= 1.20
4 [vertex shader]
5 void main()
7         gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
10 [fragment shader]
11 void main()
13     const vec2 v = normalize(vec2(1.0, 1.0));
15     /* Attempt to normalize the zero vector.  The specification is unclear
16      * about the results, but ATI returns the zero vector.  At any rate, the
17      * compiler should not crash.
18      */
19     const vec2 z = normalize(vec2(0.0, 0.0));
20     gl_FragColor = vec4(v.x, z.x, z.y, 1.0);
23 [test]
24 draw rect -1 -1 2 2
25 probe all rgb 0.7071067811865475 0.0 0.0