1 /*-------------------------------------------------------------------------
2 * drawElements Quality Program OpenGL ES 3.0 Module
3 * -------------------------------------------------
4 *
5 * Copyright 2014 The Android Open Source Project
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 *
19 *//*!
20 * \file
21 * \brief Functional Test Group.
22 *//*--------------------------------------------------------------------*/
23
24 #include "es3fFunctionalTests.hpp"
25
26 #include "es3fColorClearTest.hpp"
27 #include "es3fDepthTests.hpp"
28 #include "es3fPrerequisiteTests.hpp"
29 #include "es3fStencilTests.hpp"
30 #include "es3fDepthStencilTests.hpp"
31 #include "es3fVertexArrayTest.hpp"
32 #include "es3fUniformBlockTests.hpp"
33 #include "es3fUniformApiTests.hpp"
34 #include "es3fFragmentOutputTests.hpp"
35 #include "es3fOcclusionQueryTests.hpp"
36 #include "es3fDepthStencilClearTests.hpp"
37 #include "es3fSamplerObjectTests.hpp"
38 #include "es3fAttribLocationTests.hpp"
39 #include "es3fPixelBufferObjectTests.hpp"
40 #include "es3fRasterizationTests.hpp"
41 #include "es3fRasterizerDiscardTests.hpp"
42 #include "es3fTransformFeedbackTests.hpp"
43 #include "es3fVertexArrayObjectTests.hpp"
44 #include "es3fPrimitiveRestartTests.hpp"
45 #include "es3fInstancedRenderingTests.hpp"
46 #include "es3fSyncTests.hpp"
47 #include "es3fBlendTests.hpp"
48 #include "es3fRandomFragmentOpTests.hpp"
49 #include "es3fMultisampleTests.hpp"
50 #include "es3fMultiviewTests.hpp"
51 #include "es3fImplementationLimitTests.hpp"
52 #include "es3fDitheringTests.hpp"
53 #include "es3fClippingTests.hpp"
54 #include "es3fPolygonOffsetTests.hpp"
55 #include "es3fDrawTests.hpp"
56 #include "es3fFragOpInteractionTests.hpp"
57 #include "es3fFlushFinishTests.hpp"
58 #include "es3fFlushFinishTests.hpp"
59 #include "es3fDefaultVertexAttributeTests.hpp"
60 #include "es3fScissorTests.hpp"
61 #include "es3fLifetimeTests.hpp"
62 #include "es3fDefaultVertexArrayObjectTests.hpp"
63 #include "es3fDrawBuffersIndexedTests.hpp"
64
65 // Shader tests
66 #include "es3fShaderApiTests.hpp"
67 #include "es3fShaderConstExprTests.hpp"
68 #include "es3fShaderDiscardTests.hpp"
69 #include "es3fShaderFunctionTests.hpp"
70 #include "es3fShaderIndexingTests.hpp"
71 #include "es3fShaderLoopTests.hpp"
72 #include "es3fShaderMatrixTests.hpp"
73 #include "es3fShaderOperatorTests.hpp"
74 #include "es3fShaderReturnTests.hpp"
75 #include "es3fShaderStructTests.hpp"
76 #include "es3fShaderSwitchTests.hpp"
77 #include "es3fRandomShaderTests.hpp"
78 #include "es3fFragDepthTests.hpp"
79 #include "es3fShaderPrecisionTests.hpp"
80 #include "es3fShaderBuiltinVarTests.hpp"
81 #include "es3fShaderTextureFunctionTests.hpp"
82 #include "es3fShaderDerivateTests.hpp"
83 #include "es3fShaderPackingFunctionTests.hpp"
84 #include "es3fShaderCommonFunctionTests.hpp"
85 #include "es3fShaderInvarianceTests.hpp"
86 #include "es3fShaderFragDataTests.hpp"
87 #include "es3fBuiltinPrecisionTests.hpp"
88 #include "es3fShaderMetamorphicTests.hpp"
89
90 // Texture tests
91 #include "es3fTextureFormatTests.hpp"
92 #include "es3fTextureWrapTests.hpp"
93 #include "es3fTextureFilteringTests.hpp"
94 #include "es3fTextureMipmapTests.hpp"
95 #include "es3fTextureSizeTests.hpp"
96 #include "es3fTextureSwizzleTests.hpp"
97 #include "es3fTextureShadowTests.hpp"
98 #include "es3fTextureSpecificationTests.hpp"
99 #include "es3fVertexTextureTests.hpp"
100 #include "es3fTextureUnitTests.hpp"
101 #include "es3fCompressedTextureTests.hpp"
102
103 // Fbo tests
104 #include "es3fFboApiTests.hpp"
105 #include "es3fFboCompletenessTests.hpp"
106 #include "es3fFboColorbufferTests.hpp"
107 #include "es3fFboDepthbufferTests.hpp"
108 #include "es3fFboStencilbufferTests.hpp"
109 #include "es3fFramebufferBlitTests.hpp"
110 #include "es3fFboMultisampleTests.hpp"
111 #include "es3fFboRenderTest.hpp"
112 #include "es3fFboInvalidateTests.hpp"
113
114 // Buffer tests
115 #include "es3fBufferWriteTests.hpp"
116 #include "es3fBufferMapTests.hpp"
117 #include "es3fBufferCopyTests.hpp"
118
119 // Negative API tests
120 #include "es3fNegativeBufferApiTests.hpp"
121 #include "es3fNegativeTextureApiTests.hpp"
122 #include "es3fNegativeShaderApiTests.hpp"
123 #include "es3fNegativeFragmentApiTests.hpp"
124 #include "es3fNegativeVertexArrayApiTests.hpp"
125 #include "es3fNegativeStateApiTests.hpp"
126
127 // State query tests
128 #include "es3fBooleanStateQueryTests.hpp"
129 #include "es3fIntegerStateQueryTests.hpp"
130 #include "es3fInteger64StateQueryTests.hpp"
131 #include "es3fFloatStateQueryTests.hpp"
132 #include "es3fTextureStateQueryTests.hpp"
133 #include "es3fStringQueryTests.hpp"
134 #include "es3fSamplerStateQueryTests.hpp"
135 #include "es3fBufferObjectQueryTests.hpp"
136 #include "es3fFboStateQueryTests.hpp"
137 #include "es3fRboStateQueryTests.hpp"
138 #include "es3fShaderStateQueryTests.hpp"
139 #include "es3fInternalFormatQueryTests.hpp"
140 #include "es3fIndexedStateQueryTests.hpp"
141
142 #include "es3fReadPixelsTests.hpp"
143
144 #include "glsShaderLibrary.hpp"
145
146 namespace deqp
147 {
148 namespace gles3
149 {
150 namespace Functional
151 {
152
153 class ShaderLibraryTest : public TestCaseGroup
154 {
155 public:
ShaderLibraryTest(Context & context,const char * name,const char * description)156 ShaderLibraryTest (Context& context, const char* name, const char* description)
157 : TestCaseGroup(context, name, description)
158 {
159 }
160
init(void)161 void init (void)
162 {
163 gls::ShaderLibrary shaderLibrary(m_testCtx, m_context.getRenderContext(), m_context.getContextInfo());
164 std::string fileName = std::string("shaders/") + getName() + ".test";
165 std::vector<tcu::TestNode*> children = shaderLibrary.loadShaderFile(fileName.c_str());
166
167 for (int i = 0; i < (int)children.size(); i++)
168 addChild(children[i]);
169 }
170 };
171
172 class ShaderBuiltinFunctionTests : public TestCaseGroup
173 {
174 public:
ShaderBuiltinFunctionTests(Context & context)175 ShaderBuiltinFunctionTests (Context& context)
176 : TestCaseGroup(context, "builtin_functions", "Built-in Function Tests")
177 {
178 }
179
init(void)180 void init (void)
181 {
182 addChild(new ShaderCommonFunctionTests (m_context));
183 addChild(new ShaderPackingFunctionTests (m_context));
184 addChild(createBuiltinPrecisionTests (m_context));
185 }
186 };
187
188 class ShaderTests : public TestCaseGroup
189 {
190 public:
ShaderTests(Context & context)191 ShaderTests (Context& context)
192 : TestCaseGroup(context, "shaders", "Shading Language Tests")
193 {
194 }
195
init(void)196 void init (void)
197 {
198 addChild(new ShaderLibraryTest (m_context, "preprocessor", "Preprocessor Tests"));
199 addChild(new ShaderLibraryTest (m_context, "constants", "Constant Literal Tests"));
200 addChild(new ShaderLibraryTest (m_context, "linkage", "Linkage Tests"));
201 addChild(new ShaderLibraryTest (m_context, "conversions", "Type Conversion Tests"));
202 addChild(new ShaderLibraryTest (m_context, "conditionals", "Conditionals Tests"));
203 addChild(new ShaderLibraryTest (m_context, "declarations", "Declarations Tests"));
204 addChild(new ShaderLibraryTest (m_context, "swizzles", "Swizzle Tests"));
205 addChild(new ShaderLibraryTest (m_context, "swizzle_math_operations", "Swizzle Math Operations Tests"));
206 addChild(new ShaderLibraryTest (m_context, "functions", "Function Tests"));
207 addChild(new ShaderLibraryTest (m_context, "arrays", "Array Tests"));
208 addChild(new ShaderLibraryTest (m_context, "large_constant_arrays", "Large Constant Array Tests"));
209 addChild(new ShaderLibraryTest (m_context, "keywords", "Keyword Tests"));
210 addChild(new ShaderLibraryTest (m_context, "qualification_order", "Order Of Qualification Tests"));
211 addChild(new ShaderLibraryTest (m_context, "scoping", "Scoping of Declarations"));
212 addChild(new ShaderLibraryTest (m_context, "negative", "Miscellaneous Negative Shader Compilation Tests"));
213 addChild(new ShaderLibraryTest (m_context, "uniform_block", "Uniform block tests"));
214 addChild(new ShaderLibraryTest (m_context, "invalid_implicit_conversions", "Invalid Implicit Conversions"));
215
216 addChild(new ShaderDiscardTests (m_context));
217 addChild(new ShaderFunctionTests (m_context));
218 addChild(new ShaderIndexingTests (m_context));
219 addChild(new ShaderLoopTests (m_context));
220 addChild(new ShaderOperatorTests (m_context));
221 addChild(new ShaderMatrixTests (m_context));
222 addChild(new ShaderReturnTests (m_context));
223 addChild(new ShaderStructTests (m_context));
224 addChild(new ShaderSwitchTests (m_context));
225 addChild(new FragDepthTests (m_context));
226 addChild(new ShaderPrecisionTests (m_context));
227 addChild(new ShaderBuiltinVarTests (m_context));
228 addChild(new ShaderTextureFunctionTests (m_context)); // \todo [pyry] Move to builtin?
229 addChild(new ShaderDerivateTests (m_context)); // \todo [pyry] Move to builtin?
230 addChild(new ShaderBuiltinFunctionTests (m_context));
231 addChild(new ShaderInvarianceTests (m_context));
232 addChild(new ShaderFragDataTests (m_context));
233 addChild(new ShaderConstExprTests (m_context));
234 addChild(new ShaderMetamorphicTests (m_context));
235 addChild(new RandomShaderTests (m_context));
236 }
237 };
238
239 class TextureTests : public TestCaseGroup
240 {
241 public:
TextureTests(Context & context)242 TextureTests (Context& context)
243 : TestCaseGroup(context, "texture", "Texture Tests")
244 {
245 }
246
init(void)247 void init (void)
248 {
249 addChild(new TextureFormatTests (m_context));
250 addChild(new TextureSizeTests (m_context));
251 addChild(new TextureWrapTests (m_context));
252 addChild(new TextureFilteringTests (m_context));
253 addChild(new TextureMipmapTests (m_context));
254 addChild(new TextureSwizzleTests (m_context));
255 addChild(new TextureShadowTests (m_context));
256 addChild(new TextureSpecificationTests (m_context));
257 addChild(new VertexTextureTests (m_context));
258 addChild(new TextureUnitTests (m_context));
259 addChild(new CompressedTextureTests (m_context));
260 }
261 };
262
263 class FboTests : public TestCaseGroup
264 {
265 public:
FboTests(Context & context)266 FboTests (Context& context)
267 : TestCaseGroup(context, "fbo", "Framebuffer Object Tests")
268 {
269 }
270
init(void)271 void init (void)
272 {
273 addChild(new FboApiTests (m_context));
274 addChild(createFboCompletenessTests (m_context));
275 addChild(new FboRenderTestGroup (m_context));
276 addChild(new FboColorTests (m_context));
277 addChild(new FboDepthTests (m_context));
278 addChild(new FboStencilTests (m_context));
279 addChild(new FramebufferBlitTests (m_context));
280 addChild(new FboMultisampleTests (m_context));
281 addChild(new MultiviewTests (m_context));
282 addChild(new FboInvalidateTests (m_context));
283 }
284 };
285
286 class BufferTests : public TestCaseGroup
287 {
288 public:
BufferTests(Context & context)289 BufferTests (Context& context)
290 : TestCaseGroup(context, "buffer", "Buffer object tests")
291 {
292 }
293
init(void)294 void init (void)
295 {
296 addChild(new BufferWriteTests (m_context));
297 addChild(new BufferMapTests (m_context));
298 addChild(new BufferCopyTests (m_context));
299 }
300 };
301
302 class NegativeApiTestGroup : public TestCaseGroup
303 {
304 public:
NegativeApiTestGroup(Context & context)305 NegativeApiTestGroup (Context& context)
306 : TestCaseGroup(context, "negative_api", "Negative API Tests")
307 {
308 }
309
~NegativeApiTestGroup(void)310 virtual ~NegativeApiTestGroup (void)
311 {
312 }
313
init(void)314 virtual void init (void)
315 {
316 addChild(new NegativeBufferApiTests (m_context));
317 addChild(new NegativeTextureApiTests (m_context));
318 addChild(new NegativeShaderApiTests (m_context));
319 addChild(new NegativeFragmentApiTests (m_context));
320 addChild(new NegativeVertexArrayApiTests (m_context));
321 addChild(new NegativeStateApiTests (m_context));
322 }
323 };
324
325 class FragmentOpTests : public TestCaseGroup
326 {
327 public:
FragmentOpTests(Context & context)328 FragmentOpTests (Context& context)
329 : TestCaseGroup(context, "fragment_ops", "Per-Fragment Operation Tests")
330 {
331 }
332
init(void)333 void init (void)
334 {
335 addChild(new DepthTests (m_context));
336 addChild(new StencilTests (m_context));
337 addChild(new DepthStencilTests (m_context));
338 addChild(new BlendTests (m_context));
339 addChild(new RandomFragmentOpTests (m_context));
340 addChild(new FragOpInteractionTests (m_context));
341 addChild(new ScissorTests (m_context));
342 }
343 };
344
345 class StateQueryTests : public TestCaseGroup
346 {
347 public:
StateQueryTests(Context & context)348 StateQueryTests (Context& context)
349 : TestCaseGroup(context, "state_query", "State Query Tests")
350 {
351 }
352
init(void)353 void init (void)
354 {
355 addChild(new BooleanStateQueryTests (m_context));
356 addChild(new IntegerStateQueryTests (m_context));
357 addChild(new Integer64StateQueryTests (m_context));
358 addChild(new FloatStateQueryTests (m_context));
359 addChild(new IndexedStateQueryTests (m_context));
360 addChild(new TextureStateQueryTests (m_context));
361 addChild(new StringQueryTests (m_context));
362 addChild(new SamplerStateQueryTests (m_context));
363 addChild(new BufferObjectQueryTests (m_context));
364 addChild(new FboStateQueryTests (m_context));
365 addChild(new RboStateQueryTests (m_context));
366 addChild(new ShaderStateQueryTests (m_context));
367 addChild(new InternalFormatQueryTests (m_context));
368 }
369 };
370
FunctionalTests(Context & context)371 FunctionalTests::FunctionalTests (Context& context)
372 : TestCaseGroup(context, "functional", "Functionality Tests")
373 {
374 }
375
~FunctionalTests(void)376 FunctionalTests::~FunctionalTests (void)
377 {
378 }
379
init(void)380 void FunctionalTests::init (void)
381 {
382 addChild(new PrerequisiteTests (m_context));
383 addChild(new ImplementationLimitTests (m_context));
384 addChild(new ColorClearTest (m_context));
385 addChild(new DepthStencilClearTests (m_context));
386 addChild(new BufferTests (m_context));
387 addChild(new ShaderTests (m_context));
388 addChild(new TextureTests (m_context));
389 addChild(new FragmentOpTests (m_context));
390 addChild(new FboTests (m_context));
391 addChild(new VertexArrayTestGroup (m_context));
392 addChild(new UniformBlockTests (m_context));
393 addChild(new UniformApiTests (m_context));
394 addChild(createAttributeLocationTests (m_context));
395 addChild(new FragmentOutputTests (m_context));
396 addChild(new SamplerObjectTests (m_context));
397 addChild(new PixelBufferObjectTests (m_context));
398 addChild(new RasterizationTests (m_context));
399 addChild(new OcclusionQueryTests (m_context));
400 addChild(new VertexArrayObjectTestGroup (m_context));
401 addChild(new PrimitiveRestartTests (m_context));
402 addChild(new InstancedRenderingTests (m_context));
403 addChild(new RasterizerDiscardTests (m_context));
404 addChild(new TransformFeedbackTests (m_context));
405 addChild(new SyncTests (m_context));
406 addChild(new ShaderApiTests (m_context));
407 addChild(new NegativeApiTestGroup (m_context));
408 addChild(new MultisampleTests (m_context));
409 addChild(new ReadPixelsTests (m_context));
410 addChild(new DitheringTests (m_context));
411 addChild(new StateQueryTests (m_context));
412 addChild(new ClippingTests (m_context));
413 addChild(new PolygonOffsetTests (m_context));
414 addChild(new DrawTests (m_context));
415 addChild(new FlushFinishTests (m_context));
416 addChild(new DefaultVertexAttributeTests (m_context));
417 addChild(createLifetimeTests (m_context));
418 addChild(new DefaultVertexArrayObjectTests (m_context));
419 addChild(createDrawBuffersIndexedTests (m_context));
420 }
421
GL45ES3FunctionalTests(Context & context)422 GL45ES3FunctionalTests::GL45ES3FunctionalTests (Context& context)
423 : TestCaseGroup(context, "functional", "Functionality Tests")
424 {
425 }
426
~GL45ES3FunctionalTests(void)427 GL45ES3FunctionalTests::~GL45ES3FunctionalTests (void)
428 {
429 }
430
init(void)431 void GL45ES3FunctionalTests::init (void)
432 {
433 addChild(createDrawBuffersIndexedTests (m_context));
434 addChild(new StateQueryTests (m_context));
435 addChild(new NegativeApiTestGroup (m_context));
436 }
437
438 } // Functional
439 } // gles3
440 } // deqp
441