glsl: test loop unroll with uint overflow
[piglit.git] / tests / spec / arb_vertex_program / vp-arl-constant-array-varying.shader_test
blob3cc11aff46192e907820944c34d1d1d639f5bfc2
1 # Tests loading of a per-vertex variable entry from a constant array.
3 [require]
4 GL >= 1.3
5 ARB_vertex_program
7 [vertex program]
8 !!ARBvp1.0
9 OPTION ARB_position_invariant;
10 PARAM vals[] =  {
11                         { 0.75,  0.25, 0.0, 0.0},
12                         {-0.25,  0.25, 0.0, 0.0},
13                         { 0.75, -0.75, 0.0, 0.0},
14                         {-0.25, -0.75, 0.0, 0.0}
15                 };
16 ADDRESS A0;
17 TEMP temp;
18 MUL temp.x, vertex.position.y, {2};
19 ADD temp.x, temp, vertex.position.x;
20 ARL A0.x, temp.x;
21 ADD result.color, vals[A0.x], vertex.position.xyzz;
22 END
24 [test]
25 ortho 0 1 0 1
26 clear color 0.0 1.0 1.0 1.0
27 clear
28 draw rect 0 0 1 1
29 probe all rgba 0.75 0.25 0.0 0.0