ARB_ubo/referenced-by-shader: pass if shader compiler moves UBOs between shaders
[piglit.git] / tests / spec / arb_vertex_program / vp-arl-constant-array-huge-relative-offset.shader_test
bloba7cfdf0f743b4492e34536a84c6fe60c6bbff3f4
1 # Tests loading of a variable entry in a large constant array with an offset.
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.5, 1.0, 2.0, 0.0},
12                         {1.0, 0.0, 0.8, 0.0},
13                         {1.0, 0.0, 0.5, 0.0},
14                         {0.8, 1.0, 0.0, 0.0},
15                         {0.5, 1.0, 2.0, 0.0},
16                         {1.0, 0.0, 0.8, 0.0},
17                         {1.0, 0.0, 0.5, 0.0},
18                         {0.8, 1.0, 0.0, 0.0},
19                         {0.5, 1.0, 2.0, 0.0},
20                         {1.0, 0.0, 0.8, 0.0},
21                         {1.0, 0.0, 0.5, 0.0},
22                         {0.8, 1.0, 0.0, 0.0},
23                         {0.5, 1.0, 2.0, 0.0},
24                         {1.0, 0.0, 0.8, 0.0},
25                         {1.0, 0.0, 0.5, 0.0},
26                         {0.8, 1.0, 0.0, 0.0},
28                         {0.5, 1.0, 2.0, 0.0},
29                         {1.0, 0.0, 0.8, 0.0},
30                         {1.0, 0.0, 0.5, 0.0},
31                         {0.8, 1.0, 0.0, 0.0},
32                         {0.5, 1.0, 2.0, 0.0},
33                         {1.0, 0.0, 0.8, 0.0},
34                         {1.0, 0.0, 0.5, 0.0},
35                         {0.8, 1.0, 0.0, 0.0},
36                         {0.5, 1.0, 2.0, 0.0},
37                         {1.0, 0.0, 0.8, 0.0},
38                         {1.0, 0.0, 0.5, 0.0},
39                         {0.8, 1.0, 0.0, 0.0},
40                         {0.5, 1.0, 2.0, 0.0},
41                         {1.0, 0.0, 0.8, 0.0},
42                         {1.0, 0.0, 0.5, 0.0},
43                         {0.8, 1.0, 0.0, 0.0},
45                         {0.5, 1.0, 2.0, 0.0},
46                         {1.0, 0.0, 0.8, 0.0},
47                         {1.0, 0.0, 0.5, 0.0},
48                         {0.8, 1.0, 0.0, 0.0},
49                         {0.5, 1.0, 2.0, 0.0},
50                         {1.0, 0.0, 0.8, 0.0},
51                         {1.0, 0.0, 0.5, 0.0},
52                         {0.8, 1.0, 0.0, 0.0},
53                         {0.5, 1.0, 2.0, 0.0},
54                         {1.0, 0.0, 0.8, 0.0},
55                         {1.0, 0.0, 0.5, 0.0},
56                         {0.8, 1.0, 0.0, 0.0},
57                         {0.5, 1.0, 2.0, 0.0},
58                         {1.0, 0.0, 0.8, 0.0},
59                         {1.0, 0.0, 0.5, 0.0},
60                         {0.8, 1.0, 0.0, 0.0},
62                         {0.5, 1.0, 2.0, 0.0},
63                         {1.0, 0.0, 0.8, 0.0},
64                         {1.0, 0.0, 0.5, 0.0},
65                         {0.8, 1.0, 0.0, 0.0},
66                         {0.5, 1.0, 2.0, 0.0},
67                         {1.0, 0.0, 0.8, 0.0},
68                         {1.0, 0.0, 0.5, 0.0},
69                         {0.8, 1.0, 0.0, 0.0},
70                         {0.5, 1.0, 2.0, 0.0},
71                         {1.0, 0.0, 0.8, 0.0},
72                         {1.0, 0.0, 0.5, 0.0},
73                         {0.8, 1.0, 0.0, 0.0},
74                         {0.5, 1.0, 2.0, 0.0},
75                         {1.0, 0.0, 0.8, 0.0},
76                         {1.0, 0.0, 0.5, 0.0},
77                         {0.8, 1.0, 0.0, 0.0},
79                         {0.5, 1.0, 2.0, 0.0},
80                         {1.0, 0.0, 0.8, 0.0},
81                         {1.0, 0.0, 0.5, 0.0},
82                         {0.8, 1.0, 0.0, 0.0},
83                         {0.5, 1.0, 2.0, 0.0},
84                         {1.0, 0.0, 0.8, 0.0},
85                         {1.0, 0.0, 0.5, 0.0},
86                         {0.8, 1.0, 0.0, 0.0},
87                         {0.5, 1.0, 2.0, 0.0},
88                         {1.0, 0.0, 0.8, 0.0},
89                         {1.0, 0.0, 0.5, 0.0},
90                         {0.8, 1.0, 0.0, 0.0},
91                         {0.5, 1.0, 2.0, 0.0},
92                         {1.0, 0.0, 0.8, 0.0},
93                         {1.0, 0.0, 0.5, 0.0},
94                         {0.8, 1.0, 0.0, 0.0},
96                         {0.5, 1.0, 2.0, 0.0},
97                         {1.0, 0.0, 0.8, 0.0},
98                         {1.0, 0.0, 0.5, 0.0},
99                         {0.8, 1.0, 0.0, 0.0},
100                         {0.5, 1.0, 2.0, 0.0},
101                         {1.0, 0.0, 0.8, 0.0},
102                         {1.0, 0.0, 0.5, 0.0},
103                         {0.8, 1.0, 0.0, 0.0},
104                         {0.5, 1.0, 2.0, 0.0},
105                         {1.0, 0.0, 0.8, 0.0},
106                         {1.0, 0.0, 0.5, 0.0},
107                         {0.8, 1.0, 0.0, 0.0},
108                         {0.5, 1.0, 2.0, 0.0},
109                         {1.0, 0.0, 0.8, 0.0},
110                         {1.0, 0.0, 0.5, 0.0},
111                         {0.8, 1.0, 0.0, 0.0},
113                         {0.5, 1.0, 2.0, 0.0},
114                         {1.0, 0.0, 0.8, 0.0},
115                         {1.0, 0.0, 0.5, 0.0},
116                         {0.8, 1.0, 0.0, 0.0},
117                         {0.5, 1.0, 2.0, 0.0},
118                         {1.0, 0.0, 0.8, 0.0},
119                         {1.0, 0.0, 0.5, 0.0},
120                         {0.8, 1.0, 0.0, 0.0},
121                         {0.5, 1.0, 2.0, 0.0},
122                         {1.0, 0.0, 0.8, 0.0},
123                         {1.0, 0.0, 0.5, 0.0},
124                         {0.8, 1.0, 0.0, 0.0},
125                         {0.5, 1.0, 2.0, 0.0},
126                         {1.0, 0.0, 0.8, 0.0},
127                         {1.0, 0.0, 0.5, 0.0},
128                         {0.8, 1.0, 0.0, 0.0}
129                 };
130 ADDRESS A0;
132 ARL A0.x, program.local[0].x;
133 MOV result.color, vals[A0.x+109];
136 [test]
137 ortho 0 1 0 1
138 parameter local_vp 0 (-1.0, 0.0, 0.0, 0.0)
139 clear color 1.0 0.0 0.0 1.0
140 clear
141 draw rect 0 0 1 1
142 probe all rgba 0.5 1.0 1.0 0.0
143 parameter local_vp 0 (0.0, 0.0, 0.0, 0.0)
144 clear color 0.0 1.0 0.0 1.0
145 clear
146 draw rect 0 0 1 1
147 probe all rgba 1.0 0.0 0.8 0.0
148 parameter local_vp 0 (1.0, 0.0, 0.0, 0.0)
149 clear color 0.0 1.0 1.0 1.0
150 clear
151 draw rect 0 0 1 1
152 probe all rgba 1.0 0.0 0.5 0.0
153 parameter local_vp 0 (2.0, 0.0, 0.0, 0.0)
154 clear color 0.0 0.0 1.0 1.0
155 clear
156 draw rect 0 0 1 1
157 probe all rgba 0.8 1.0 0.0 0.0