glsl: test loop unroll with uint overflow
[piglit.git] / tests / spec / arb_vertex_program / vp-arl-constant-array-huge-varying.shader_test
blob7192d92af8d098e24272c0e364f6611561f57358
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                         {1.0, 0.0, 1.0, 0.0},
16                         {1.0, 0.0, 1.0, 0.0},
17                         {1.0, 0.0, 1.0, 0.0},
18                         {1.0, 0.0, 1.0, 0.0},
19                         {1.0, 0.0, 1.0, 0.0},
20                         {1.0, 0.0, 1.0, 0.0},
21                         {1.0, 0.0, 1.0, 0.0},
22                         {1.0, 0.0, 1.0, 0.0},
23                         {1.0, 0.0, 1.0, 0.0},
24                         {1.0, 0.0, 1.0, 0.0},
25                         {1.0, 0.0, 1.0, 0.0},
26                         {1.0, 0.0, 1.0, 0.0},
28                         {1.0, 0.0, 1.0, 0.0},
29                         {1.0, 0.0, 1.0, 0.0},
30                         {1.0, 0.0, 1.0, 0.0},
31                         {1.0, 0.0, 1.0, 0.0},
32                         {1.0, 0.0, 1.0, 0.0},
33                         {1.0, 0.0, 1.0, 0.0},
34                         {1.0, 0.0, 1.0, 0.0},
35                         {1.0, 0.0, 1.0, 0.0},
36                         {1.0, 0.0, 1.0, 0.0},
37                         {1.0, 0.0, 1.0, 0.0},
38                         {1.0, 0.0, 1.0, 0.0},
39                         {1.0, 0.0, 1.0, 0.0},
40                         {1.0, 0.0, 1.0, 0.0},
41                         {1.0, 0.0, 1.0, 0.0},
42                         {1.0, 0.0, 1.0, 0.0},
43                         {1.0, 0.0, 1.0, 0.0},
45                         {1.0, 0.0, 1.0, 0.0},
46                         {1.0, 0.0, 1.0, 0.0},
47                         {1.0, 0.0, 1.0, 0.0},
48                         {1.0, 0.0, 1.0, 0.0},
49                         {1.0, 0.0, 1.0, 0.0},
50                         {1.0, 0.0, 1.0, 0.0},
51                         {1.0, 0.0, 1.0, 0.0},
52                         {1.0, 0.0, 1.0, 0.0},
53                         {1.0, 0.0, 1.0, 0.0},
54                         {1.0, 0.0, 1.0, 0.0},
55                         {1.0, 0.0, 1.0, 0.0},
56                         {1.0, 0.0, 1.0, 0.0},
57                         {1.0, 0.0, 1.0, 0.0},
58                         {1.0, 0.0, 1.0, 0.0},
59                         {1.0, 0.0, 1.0, 0.0},
60                         {1.0, 0.0, 1.0, 0.0},
65                         {1.0, 0.0, 1.0, 0.0},
66                         {1.0, 0.0, 1.0, 0.0},
67                         {1.0, 0.0, 1.0, 0.0},
68                         {1.0, 0.0, 1.0, 0.0},
69                         {1.0, 0.0, 1.0, 0.0},
70                         {1.0, 0.0, 1.0, 0.0},
71                         {1.0, 0.0, 1.0, 0.0},
72                         {1.0, 0.0, 1.0, 0.0},
73                         {1.0, 0.0, 1.0, 0.0},
74                         {1.0, 0.0, 1.0, 0.0},
75                         {1.0, 0.0, 1.0, 0.0},
76                         {1.0, 0.0, 1.0, 0.0},
77                         {1.0, 0.0, 1.0, 0.0},
78                         {1.0, 0.0, 1.0, 0.0},
79                         {1.0, 0.0, 1.0, 0.0},
80                         {1.0, 0.0, 1.0, 0.0},
82                         {1.0, 0.0, 1.0, 0.0},
83                         {1.0, 0.0, 1.0, 0.0},
84                         {1.0, 0.0, 1.0, 0.0},
85                         {1.0, 0.0, 1.0, 0.0},
86                         {1.0, 0.0, 1.0, 0.0},
87                         {1.0, 0.0, 1.0, 0.0},
88                         {1.0, 0.0, 1.0, 0.0},
89                         {1.0, 0.0, 1.0, 0.0},
90                         {1.0, 0.0, 1.0, 0.0},
91                         {1.0, 0.0, 1.0, 0.0},
92                         {1.0, 0.0, 1.0, 0.0},
93                         {1.0, 0.0, 1.0, 0.0},
94                         {1.0, 0.0, 1.0, 0.0},
95                         {1.0, 0.0, 1.0, 0.0},
96                         {1.0, 0.0, 1.0, 0.0},
97                         {1.0, 0.0, 1.0, 0.0},
99                         {1.0, 0.0, 1.0, 0.0},
100                         {1.0, 0.0, 1.0, 0.0},
101                         {1.0, 0.0, 1.0, 0.0},
102                         {1.0, 0.0, 1.0, 0.0},
103                         {1.0, 0.0, 1.0, 0.0},
104                         {1.0, 0.0, 1.0, 0.0},
105                         {1.0, 0.0, 1.0, 0.0},
106                         {1.0, 0.0, 1.0, 0.0},
107                         {1.0, 0.0, 1.0, 0.0},
108                         {1.0, 0.0, 1.0, 0.0},
109                         {1.0, 0.0, 1.0, 0.0},
110                         {1.0, 0.0, 1.0, 0.0},
111                         {1.0, 0.0, 1.0, 0.0},
112                         {1.0, 0.0, 1.0, 0.0},
113                         {1.0, 0.0, 1.0, 0.0},
114                         {1.0, 0.0, 1.0, 0.0},
116                         {1.0, 0.0, 1.0, 0.0},
117                         {1.0, 0.0, 1.0, 0.0},
118                         {1.0, 0.0, 1.0, 0.0},
119                         {1.0, 0.0, 1.0, 0.0},
120                         {1.0, 0.0, 1.0, 0.0},
121                         {1.0, 0.0, 1.0, 0.0},
122                         {1.0, 0.0, 1.0, 0.0},
123                         {1.0, 0.0, 1.0, 0.0},
124                         {1.0, 0.0, 1.0, 0.0},
125                         {1.0, 0.0, 1.0, 0.0},
126                         {1.0, 0.0, 1.0, 0.0},
127                         {1.0, 0.0, 1.0, 0.0},
128                         {1.0, 0.0, 1.0, 0.0},
129                         {1.0, 0.0, 1.0, 0.0},
130                         {1.0, 0.0, 1.0, 0.0},
131                         {1.0, 0.0, 1.0, 0.0},
133                         {1.0, 0.0, 1.0, 0.0},
134                         {1.0, 0.0, 1.0, 0.0},
135                         {1.0, 0.0, 1.0, 0.0},
136                         {1.0, 0.0, 1.0, 0.0},
137                         {1.0, 0.0, 1.0, 0.0},
138                         {1.0, 0.0, 1.0, 0.0},
139                         {1.0, 0.0, 1.0, 0.0},
140                         {1.0, 0.0, 1.0, 0.0},
141                         {1.0, 0.0, 1.0, 0.0},
142                         {1.0, 0.0, 1.0, 0.0},
143                         {1.0, 0.0, 1.0, 0.0},
144                         {1.0, 0.0, 1.0, 0.0},
145                         {1.0, 0.0, 1.0, 0.0},
146                         {1.0, 0.0, 1.0, 0.0},
147                         {1.0, 0.0, 1.0, 0.0},
148                         {1.0, 0.0, 1.0, 0.0}
149                 };
150 ADDRESS A0;
151 TEMP temp;
152 MUL temp.x, vertex.position.y, {2};
153 ADD temp.x, temp, vertex.position.x;
154 ARL A0.x, temp.x;
155 ADD result.color, vals[A0.x], vertex.position.xyzz;
158 [test]
159 ortho 0 1 0 1
160 clear color 0.0 1.0 1.0 1.0
161 clear
162 draw rect 0 0 1 1
163 probe all rgba 0.75 0.25 0.0 0.0