ext_gpu_shader4: add compiler tests for everything
[piglit.git] / tests / spec / arb_vertex_program / vp-arl-constant-array-huge.shader_test
blob06af36e097c747c805c29cc8b1cc957766438fea
1 # Tests loading of an entry in a large constant array.  Caught failure in the
2 # 965 driver where only the first entry of the constant array was necessarily
3 # correct, and the state containing the transformation matrix wasn't set up.
5 [require]
6 GL >= 1.3
7 ARB_vertex_program
9 [vertex program]
10 !!ARBvp1.0
11 OPTION ARB_position_invariant;
12 PARAM vals[] =  {
13                         {0.5, 1.0, 2.0, 0.0},
14                         {1.0, 0.0, 0.8, 0.0},
15                         {1.0, 0.0, 0.5, 0.0},
16                         {0.8, 1.0, 0.0, 0.0},
17                         {0.5, 1.0, 2.0, 0.0},
18                         {1.0, 0.0, 0.8, 0.0},
19                         {1.0, 0.0, 0.5, 0.0},
20                         {0.8, 1.0, 0.0, 0.0},
21                         {0.5, 1.0, 2.0, 0.0},
22                         {1.0, 0.0, 0.8, 0.0},
23                         {1.0, 0.0, 0.5, 0.0},
24                         {0.8, 1.0, 0.0, 0.0},
25                         {0.5, 1.0, 2.0, 0.0},
26                         {1.0, 0.0, 0.8, 0.0},
27                         {1.0, 0.0, 0.5, 0.0},
28                         {0.8, 1.0, 0.0, 0.0},
30                         {0.5, 1.0, 2.0, 0.0},
31                         {1.0, 0.0, 0.8, 0.0},
32                         {1.0, 0.0, 0.5, 0.0},
33                         {0.8, 1.0, 0.0, 0.0},
34                         {0.5, 1.0, 2.0, 0.0},
35                         {1.0, 0.0, 0.8, 0.0},
36                         {1.0, 0.0, 0.5, 0.0},
37                         {0.8, 1.0, 0.0, 0.0},
38                         {0.5, 1.0, 2.0, 0.0},
39                         {1.0, 0.0, 0.8, 0.0},
40                         {1.0, 0.0, 0.5, 0.0},
41                         {0.8, 1.0, 0.0, 0.0},
42                         {0.5, 1.0, 2.0, 0.0},
43                         {1.0, 0.0, 0.8, 0.0},
44                         {1.0, 0.0, 0.5, 0.0},
45                         {0.8, 1.0, 0.0, 0.0},
47                         {0.5, 1.0, 2.0, 0.0},
48                         {1.0, 0.0, 0.8, 0.0},
49                         {1.0, 0.0, 0.5, 0.0},
50                         {0.8, 1.0, 0.0, 0.0},
51                         {0.5, 1.0, 2.0, 0.0},
52                         {1.0, 0.0, 0.8, 0.0},
53                         {1.0, 0.0, 0.5, 0.0},
54                         {0.8, 1.0, 0.0, 0.0},
55                         {0.5, 1.0, 2.0, 0.0},
56                         {1.0, 0.0, 0.8, 0.0},
57                         {1.0, 0.0, 0.5, 0.0},
58                         {0.8, 1.0, 0.0, 0.0},
59                         {0.5, 1.0, 2.0, 0.0},
60                         {1.0, 0.0, 0.8, 0.0},
61                         {1.0, 0.0, 0.5, 0.0},
62                         {0.8, 1.0, 0.0, 0.0},
64                         {0.5, 1.0, 2.0, 0.0},
65                         {1.0, 0.0, 0.8, 0.0},
66                         {1.0, 0.0, 0.5, 0.0},
67                         {0.8, 1.0, 0.0, 0.0},
68                         {0.5, 1.0, 2.0, 0.0},
69                         {1.0, 0.0, 0.8, 0.0},
70                         {1.0, 0.0, 0.5, 0.0},
71                         {0.8, 1.0, 0.0, 0.0},
72                         {0.5, 1.0, 2.0, 0.0},
73                         {1.0, 0.0, 0.8, 0.0},
74                         {1.0, 0.0, 0.5, 0.0},
75                         {0.8, 1.0, 0.0, 0.0},
76                         {0.5, 1.0, 2.0, 0.0},
77                         {1.0, 0.0, 0.8, 0.0},
78                         {1.0, 0.0, 0.5, 0.0},
79                         {0.8, 1.0, 0.0, 0.0},
81                         {0.5, 1.0, 2.0, 0.0},
82                         {1.0, 0.0, 0.8, 0.0},
83                         {1.0, 0.0, 0.5, 0.0},
84                         {0.8, 1.0, 0.0, 0.0},
85                         {0.5, 1.0, 2.0, 0.0},
86                         {1.0, 0.0, 0.8, 0.0},
87                         {1.0, 0.0, 0.5, 0.0},
88                         {0.8, 1.0, 0.0, 0.0},
89                         {0.5, 1.0, 2.0, 0.0},
90                         {1.0, 0.0, 0.8, 0.0},
91                         {1.0, 0.0, 0.5, 0.0},
92                         {0.8, 1.0, 0.0, 0.0},
93                         {0.5, 1.0, 2.0, 0.0},
94                         {1.0, 0.0, 0.8, 0.0},
95                         {1.0, 0.0, 0.5, 0.0},
96                         {0.8, 1.0, 0.0, 0.0},
98                         {0.5, 1.0, 2.0, 0.0},
99                         {1.0, 0.0, 0.8, 0.0},
100                         {1.0, 0.0, 0.5, 0.0},
101                         {0.8, 1.0, 0.0, 0.0},
102                         {0.5, 1.0, 2.0, 0.0},
103                         {1.0, 0.0, 0.8, 0.0},
104                         {1.0, 0.0, 0.5, 0.0},
105                         {0.8, 1.0, 0.0, 0.0},
106                         {0.5, 1.0, 2.0, 0.0},
107                         {1.0, 0.0, 0.8, 0.0},
108                         {1.0, 0.0, 0.5, 0.0},
109                         {0.8, 1.0, 0.0, 0.0},
110                         {0.5, 1.0, 2.0, 0.0},
111                         {1.0, 0.0, 0.8, 0.0},
112                         {1.0, 0.0, 0.5, 0.0},
113                         {0.8, 1.0, 0.0, 0.0},
115                         {0.5, 1.0, 2.0, 0.0},
116                         {1.0, 0.0, 0.8, 0.0},
117                         {1.0, 0.0, 0.5, 0.0},
118                         {0.8, 1.0, 0.0, 0.0},
119                         {0.5, 1.0, 2.0, 0.0},
120                         {1.0, 0.0, 0.8, 0.0},
121                         {1.0, 0.0, 0.5, 0.0},
122                         {0.8, 1.0, 0.0, 0.0},
123                         {0.5, 1.0, 2.0, 0.0},
124                         {1.0, 0.0, 0.8, 0.0},
125                         {1.0, 0.0, 0.5, 0.0},
126                         {0.8, 1.0, 0.0, 0.0},
127                         {0.5, 1.0, 2.0, 0.0},
128                         {1.0, 0.0, 0.8, 0.0},
129                         {1.0, 0.0, 0.5, 0.0},
130                         {0.8, 1.0, 0.0, 0.0}
131                 };
132 ADDRESS A0;
134 ARL A0.x, program.local[0].x;
135 MOV result.color, vals[A0.x+0];
138 [test]
139 ortho 0 1 0 1
140 parameter local_vp 0 (0.0, 0.0, 0.0, 0.0)
141 clear color 1.0 0.0 0.0 1.0
142 clear
143 draw rect 0 0 1 1
144 probe all rgba 0.5 1.0 1.0 0.0
145 parameter local_vp 0 (1.0, 0.0, 0.0, 0.0)
146 clear color 0.0 1.0 0.0 1.0
147 clear
148 draw rect 0 0 1 1
149 probe all rgba 1.0 0.0 0.8 0.0
150 parameter local_vp 0 (2.0, 0.0, 0.0, 0.0)
151 clear color 0.0 1.0 1.0 1.0
152 clear
153 draw rect 0 0 1 1
154 probe all rgba 1.0 0.0 0.5 0.0
155 parameter local_vp 0 (3.0, 0.0, 0.0, 0.0)
156 clear color 0.0 0.0 1.0 1.0
157 clear
158 draw rect 0 0 1 1
159 probe all rgba 0.8 1.0 0.0 0.0