framework/replay: disable AA accounting when comparing with no tolerance
[piglit.git] / tests / glslparsertest / shaders / CorrectFunction.vert
blobdd9f20981bf25988a2703de07e4d1d86b44d5023
1 // [config]
2 // expect_result: pass
3 // glsl_version: 1.10
4 //
5 // [end config]
7 uniform sampler1D sampler;
8 uniform sampler2D sampler2;
9 uniform sampler3D sampler3;
10 uniform samplerCube samplerc;
11 uniform sampler1DShadow sampler1dshadow;
12 uniform sampler2DShadow sampler2dshadow;
14 void main(void)
16     float float1;
17     vec2 test_vec2;
18     vec3 test_vec3;
19     vec4 test_vec4;
20     bvec2 test_bvec2;
21     bvec3 test_bvec3;
22     bvec4 test_bvec4;
23     ivec2 test_ivec2;
24     ivec3 test_ivec3;
25     ivec4 test_ivec4;
26     bool test_bool;
28     float1 = radians(45.0); 
29     test_vec2 = radians(test_vec2); 
30     test_vec3 = radians(test_vec3); 
31     test_vec4 = radians(test_vec4); 
33     float1 = degrees(float1);
34     test_vec2 =  degrees(test_vec2);
35     test_vec3 =  degrees(test_vec3);
36     test_vec4 =  degrees(test_vec4);
38     float1 = sin(float1 );
39     test_vec2 = sin(test_vec2);
40     test_vec3 = sin(test_vec3);
41     test_vec4 = sin(test_vec4);
43     float1 = cos(float1);
44     test_vec2 = cos(test_vec2);
45     test_vec3 = cos(test_vec3);
46     test_vec4 = cos(test_vec4);
48     float1 = tan(float1);
49     test_vec2 = tan(test_vec2);
50     test_vec3 = tan(test_vec3);
51     test_vec4 = tan(test_vec4);
53     float1 = asin(float1);
54     test_vec2 = asin(test_vec2);
55     test_vec3 = asin(test_vec3);
56     test_vec4 = asin(test_vec4);
58     float1 = acos(float1);
59     test_vec2 = acos(test_vec2);
60     test_vec3 = acos(test_vec3);
61     test_vec4 = acos(test_vec4);
63     float1 = atan(float1, float1);
64     test_vec2 = atan(test_vec2, test_vec2);
65     test_vec3 = atan(test_vec3, test_vec3);
66     test_vec4 = atan(test_vec4, test_vec4);
67     
68     float1 = atan(float1);
69     test_vec2 = atan(test_vec2);
70     test_vec3 = atan(test_vec3);
71     test_vec4 = atan(test_vec4);
73     float1 = pow(float1, float1);
74     test_vec2 = pow(test_vec2, test_vec2);
75     test_vec3 = pow(test_vec3, test_vec3);
76     test_vec4 = pow(test_vec4, test_vec4);
78     float1 = exp2(float1);
79     test_vec2 = exp2(test_vec2);
80     test_vec3 = exp2(test_vec3);
81     test_vec4 = exp2(test_vec4);
83     float1 = log2(float1);
84     test_vec2 = log2(test_vec2);
85     test_vec3 = log2(test_vec3);
86     test_vec4 = log2(test_vec4);
88     float1 = sqrt(float1);
89     test_vec2 = sqrt(test_vec2);
90     test_vec3 = sqrt(test_vec3);
91     test_vec4 = sqrt(test_vec4);
93     float1 = inversesqrt(float1);
94     test_vec2 = inversesqrt(test_vec2);
95     test_vec3 = inversesqrt(test_vec3);
96     test_vec4 = inversesqrt(test_vec4);
98     float1 = abs(float1);
99     test_vec2 = abs(test_vec2);
100     test_vec3 = abs(test_vec3);
101     test_vec4 = abs(test_vec4);
103     float1 = sign(float1);
104     test_vec2 = sign(test_vec2);
105     test_vec3 = sign(test_vec3);
106     test_vec4 = sign(test_vec4);
108     float1 = floor(float1);
109     test_vec2 = floor(test_vec2);
110     test_vec3 = floor(test_vec3);
111     test_vec4 = floor(test_vec4);
113     float1 = ceil(float1);
114     test_vec2 = ceil(test_vec2);
115     test_vec3 = ceil(test_vec3);
116     test_vec4 = ceil(test_vec4);
118     float1 = fract(float1);
119     test_vec2 = fract(test_vec2);
120     test_vec3 = fract(test_vec3);
121     test_vec4 = fract(test_vec4);
123     float1 = mod(float1, float1);
124     test_vec2 = mod(test_vec2, float1);
125     test_vec3 = mod(test_vec3, float1);
126     test_vec4 = mod(test_vec4, float1);
127     test_vec2 = mod(test_vec2, test_vec2);
128     test_vec3 = mod(test_vec3, test_vec3);
129     test_vec4 = mod(test_vec4, test_vec4);
131     float1 = min(float1, float1);
132     test_vec2 = min(test_vec2, float1);
133     test_vec3 = min(test_vec3, float1);
134     test_vec4 = min(test_vec4, float1);
135     test_vec2 = min(test_vec2, test_vec2);
136     test_vec3 = min(test_vec3, test_vec3);
137     test_vec4 = min(test_vec4, test_vec4);
139     float1 = max(float1, float1);
140     test_vec2 = max(test_vec2, float1);
141     test_vec3 = max(test_vec3, float1);
142     test_vec4 = max(test_vec4, float1);
143     test_vec2 = max(test_vec2, test_vec2);
144     test_vec3 = max(test_vec3, test_vec3);
145     test_vec4 = max(test_vec4, test_vec4);
147     float1 = clamp(float1, float1, float1);
148     test_vec2 = clamp(test_vec2, float1, float1);
149     test_vec3 = clamp(test_vec3, float1, float1);
150     test_vec4 = clamp(test_vec4, float1, float1);
151     test_vec2 = clamp(test_vec2, test_vec2, test_vec2);
152     test_vec3 = clamp(test_vec3, test_vec3, test_vec3);
153     test_vec4 = clamp(test_vec4, test_vec4, test_vec4);
155     float1 = mix(float1, float1, float1);
156     test_vec2 = mix(test_vec2, test_vec2, float1);
157     test_vec3 = mix(test_vec3, test_vec3, float1);
158     test_vec4 = mix(test_vec4, test_vec4, float1);
159     test_vec2 = mix(test_vec2, test_vec2, test_vec2);
160     test_vec3 = mix(test_vec3, test_vec3, test_vec3);
161     test_vec4 = mix(test_vec4, test_vec4, test_vec4);
163     float1 = step(float1, float1);
164     test_vec2 = step(test_vec2, test_vec2);
165     test_vec3 = step(test_vec3, test_vec3);
166     test_vec4 = step(test_vec4, test_vec4);
167     test_vec2 = step(float1, test_vec2); 
168     test_vec3 = step(float1, test_vec3); 
169     test_vec4 = step(float1, test_vec4); 
171     float1 = smoothstep(float1, float1, float1);
172     test_vec2 = smoothstep(test_vec2, test_vec2, test_vec2);
173     test_vec3 = smoothstep(test_vec3, test_vec3, test_vec3);
174     test_vec4 = smoothstep(test_vec4, test_vec4, test_vec4);
175     test_vec2 = smoothstep(float1, float1, test_vec2); 
176     test_vec3 = smoothstep(float1, float1, test_vec3); 
177     test_vec4 = smoothstep(float1, float1, test_vec4); 
179     float1 =  length(float1);
180     float1 =  length(test_vec2);
181     float1 =  length(test_vec3);
182     float1 =  length(test_vec4);
184     float1 =  distance(float1, float1);
185     float1 =  distance(test_vec2, test_vec2);
186     float1 =  distance(test_vec3, test_vec3);
187     float1 =  distance(test_vec4, test_vec4);
189     float1 =  dot(float1, float1);
190     float1 =  dot(test_vec2, test_vec2);
191     float1 =  dot(test_vec3, test_vec3);
192     float1 =  dot(test_vec4, test_vec4);
194     test_vec3 =  cross(test_vec3, test_vec3);
196     float1 = normalize(float1);
197     test_vec2 = normalize(test_vec2);
198     test_vec3 = normalize(test_vec3);
199     test_vec4 = normalize(test_vec4);
201     float1 = faceforward(float1, float1, float1);
202     test_vec2 = faceforward(test_vec2, test_vec2, test_vec2);
203     test_vec3 = faceforward(test_vec3, test_vec3, test_vec3);
204     test_vec4 = faceforward(test_vec4, test_vec4, test_vec4);
206     float1 = reflect(float1, float1);
207     test_vec2 = reflect(test_vec2, test_vec2);
208     test_vec3 = reflect(test_vec3, test_vec3);
209     test_vec4 = reflect(test_vec4, test_vec4);
211     test_bvec2 = lessThan(test_vec2, test_vec2);
212     test_bvec3 = lessThan(test_vec3, test_vec3);
213     test_bvec4 = lessThan(test_vec4, test_vec4);
215     test_bvec2 = lessThan(test_ivec2, test_ivec2);
216     test_bvec3 = lessThan(test_ivec3, test_ivec3);
217     test_bvec4 = lessThan(test_ivec4, test_ivec4);
219     test_bvec2 = lessThanEqual(test_vec2, test_vec2);
220     test_bvec3 = lessThanEqual(test_vec3, test_vec3);
221     test_bvec4 = lessThanEqual(test_vec4, test_vec4);
223     test_bvec2 =  lessThanEqual(test_ivec2, test_ivec2);
224     test_bvec3 =  lessThanEqual(test_ivec3, test_ivec3);
225     test_bvec4 =  lessThanEqual(test_ivec4, test_ivec4);
227     test_bvec2 =  greaterThan(test_vec2, test_vec2);
228     test_bvec3 =  greaterThan(test_vec3, test_vec3);
229     test_bvec4 =  greaterThan(test_vec4, test_vec4);
231     test_bvec2 =  greaterThan(test_ivec2, test_ivec2);
232     test_bvec3 =  greaterThan(test_ivec3, test_ivec3);
233     test_bvec4 =  greaterThan(test_ivec4, test_ivec4);
235     test_bvec2 =  greaterThanEqual(test_vec2, test_vec2);
236     test_bvec3 =  greaterThanEqual(test_vec3, test_vec3);
237     test_bvec4 =  greaterThanEqual(test_vec4, test_vec4);
239     test_bvec2 =  greaterThanEqual(test_ivec2, test_ivec2);
240     test_bvec3 =  greaterThanEqual(test_ivec3, test_ivec3);
241     test_bvec4 =  greaterThanEqual(test_ivec4, test_ivec4);
243     test_bvec2 =  equal(test_vec2, test_vec2);
244     test_bvec3 =  equal(test_vec3, test_vec3);
245     test_bvec4 =  equal(test_vec4, test_vec4);
247     test_bvec2 =  equal(test_ivec2, test_ivec2);
248     test_bvec3 =  equal(test_ivec3, test_ivec3);
249     test_bvec4 =  equal(test_ivec4, test_ivec4);
251     test_bvec2 =  equal(test_bvec2, test_bvec2);
252     test_bvec3 =  equal(test_bvec3, test_bvec3);
253     test_bvec4 =  equal(test_bvec4, test_bvec4);
255     test_bool =  any(test_bvec2);
256     test_bool =  any(test_bvec3);
257     test_bool =  any(test_bvec4);
259     test_bool =  all(test_bvec2);
260     test_bool =  all(test_bvec3);
261     test_bool =  all(test_bvec4);
263     float1 =  noise1(float1);
264     float1 =  noise1(test_vec2);
265     float1 =  noise1(test_vec3);
266     float1 =  noise1(test_vec4);
268     test_vec2 =  noise2(float1);
269     test_vec2 =  noise2(test_vec2);
270     test_vec2 =  noise2(test_vec3);
271     test_vec2 =  noise2(test_vec4);
273     test_vec3 =  noise3(float1);
274     test_vec3 =  noise3(test_vec2);
275     test_vec3 =  noise3(test_vec3);
276     test_vec3 =  noise3(test_vec4);
278     test_vec4 =  noise4(float1);
279     test_vec4 =  noise4(test_vec2);
280     test_vec4 =  noise4(test_vec3);
281     test_vec4 =  noise4(test_vec4);
283     float bias, lod;
285     test_vec4 = texture1D(sampler, float1);
286     test_vec4 = texture1DProj(sampler, test_vec2);
287     test_vec4 = texture1DProj(sampler, test_vec4 );
288     test_vec4 = texture1DLod(sampler, float1 , lod );
289     test_vec4 = texture1DProjLod(sampler, test_vec2 , lod );
290     test_vec4 = texture1DProjLod(sampler, test_vec4 , lod );
291     test_vec4 = texture2D(sampler2, test_vec2 );
292     test_vec4 = texture2DProj(sampler2, test_vec3 );
293     test_vec4 = texture2DProj(sampler2, test_vec4 );
294     test_vec4 = texture2DLod(sampler2, test_vec2 , lod );
295     test_vec4 = texture2DProjLod(sampler2, test_vec3 , lod );
296     test_vec4 = texture2DProjLod(sampler2, test_vec4 , lod );
297     test_vec4 = texture3D(sampler3, test_vec3 );
298     test_vec4 = texture3DProj(sampler3, test_vec4 );
299     test_vec4 = texture3DLod(sampler3, test_vec3 , lod );
300     test_vec4 = texture3DProjLod(sampler3, test_vec4 , lod );
301     test_vec4 = textureCube(samplerc, test_vec3 );
302     test_vec4 = textureCubeLod(samplerc, test_vec3 , lod );
303     test_vec4 = shadow1D(sampler1dshadow, test_vec3 );
304     test_vec4 = shadow2D(sampler2dshadow, test_vec3 );
305     test_vec4 = shadow1DProj(sampler1dshadow, test_vec4 );
306     test_vec4 = shadow2DProj(sampler2dshadow, test_vec4 );
307     test_vec4 = shadow1DLod(sampler1dshadow, test_vec3 , lod );
308     test_vec4 = shadow2DLod(sampler2dshadow, test_vec3 , lod );
309     test_vec4 = shadow1DProjLod(sampler1dshadow, test_vec4, lod);
310     test_vec4 = shadow2DProjLod(sampler2dshadow, test_vec4,lod);
314     test_vec4 = ftransform();
317    gl_Position = gl_Vertex ;