glsl-array-bounds: set out-of-bounds array index inside shader
[piglit.git] / tests / shaders / glsl-fs-texture2d-dependent-3.shader_test
blobe0d08d789bbb944691e824ecf352cc3ce8a84c1f
1 [require]
2 GLSL >= 1.10
4 [vertex shader]
5 varying vec4 texcoords;
7 void main()
9         gl_Position = gl_Vertex;
10         texcoords = (gl_Vertex + 1.0);
13 [fragment shader]
14 varying vec4 texcoords;
15 uniform sampler2D tex;
17 void main()
19         /* Try to trick i965's type handling by using integers. */
20         ivec2 itc = ivec2(texcoords + 0.5);
22         gl_FragColor = texture2D(tex, vec2(itc));
25 [test]
26 uniform int tex 0
27 texture rgbw 0 (8, 8)
28 draw rect -1 -1 2 2
29 relative probe rgb (0.1, 0.1) (1.0, 0.0, 0.0)
30 relative probe rgb (0.9, 0.1) (0.0, 1.0, 0.0)
31 relative probe rgb (0.1, 0.9) (0.0, 0.0, 1.0)
32 relative probe rgb (0.9, 0.9) (1.0, 1.0, 1.0)
33 relative probe rgb (0.3, 0.3) (1.0, 1.0, 1.0)