• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*-------------------------------------------------------------------------
2  * drawElements Quality Program OpenGL ES 2.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 Base class for a test case.
22  *//*--------------------------------------------------------------------*/
23 
24 #include "es2fFunctionalTests.hpp"
25 
26 #include "es2fColorClearTest.hpp"
27 #include "es2fLightAmountTest.hpp"
28 #include "es2fMultisampledRenderToTextureTests.hpp"
29 #include "es2fShaderExecuteTest.hpp"
30 #include "es2fFboApiTest.hpp"
31 #include "es2fFboRenderTest.hpp"
32 #include "es2fFboCompletenessTests.hpp"
33 #include "es2fRandomShaderTests.hpp"
34 #include "es2fPrerequisiteTests.hpp"
35 #include "es2fDepthTests.hpp"
36 #include "es2fStencilTests.hpp"
37 #include "es2fScissorTests.hpp"
38 #include "es2fVertexArrayTest.hpp"
39 #include "es2fRasterizationTests.hpp"
40 #include "es2fDepthStencilClearTests.hpp"
41 #include "es2fDepthStencilTests.hpp"
42 #include "es2fBlendTests.hpp"
43 #include "es2fRandomFragmentOpTests.hpp"
44 #include "es2fMultisampleTests.hpp"
45 #include "es2fUniformApiTests.hpp"
46 #include "es2fBufferWriteTests.hpp"
47 #include "es2fImplementationLimitTests.hpp"
48 #include "es2fDepthRangeTests.hpp"
49 #include "es2fDitheringTests.hpp"
50 #include "es2fClippingTests.hpp"
51 #include "es2fClipControlTests.hpp"
52 #include "es2fPolygonOffsetTests.hpp"
53 #include "es2fDrawTests.hpp"
54 #include "es2fFragOpInteractionTests.hpp"
55 #include "es2fFlushFinishTests.hpp"
56 #include "es2fDefaultVertexAttributeTests.hpp"
57 #include "es2fLifetimeTests.hpp"
58 
59 #include "es2fTextureFormatTests.hpp"
60 #include "es2fTextureWrapTests.hpp"
61 #include "es2fTextureFilteringTests.hpp"
62 #include "es2fTextureMipmapTests.hpp"
63 #include "es2fTextureSizeTests.hpp"
64 #include "es2fTextureSpecificationTests.hpp"
65 #include "es2fTextureCompletenessTests.hpp"
66 #include "es2fNegativeVertexArrayApiTests.hpp"
67 #include "es2fNegativeTextureApiTests.hpp"
68 #include "es2fNegativeFragmentApiTests.hpp"
69 #include "es2fNegativeBufferApiTests.hpp"
70 #include "es2fNegativeShaderApiTests.hpp"
71 #include "es2fNegativeStateApiTests.hpp"
72 #include "es2fVertexTextureTests.hpp"
73 #include "es2fTextureUnitTests.hpp"
74 
75 #include "es2fShaderApiTests.hpp"
76 #include "es2fShaderAlgorithmTests.hpp"
77 #include "es2fShaderBuiltinVarTests.hpp"
78 #include "es2fShaderConstExprTests.hpp"
79 #include "es2fShaderDiscardTests.hpp"
80 #include "es2fShaderIndexingTests.hpp"
81 #include "es2fShaderLoopTests.hpp"
82 #include "es2fShaderOperatorTests.hpp"
83 #include "es2fShaderReturnTests.hpp"
84 #include "es2fShaderStructTests.hpp"
85 #include "es2fShaderMatrixTests.hpp"
86 #include "es2fShaderTextureFunctionTests.hpp"
87 #include "es2fAttribLocationTests.hpp"
88 #include "es2fShaderInvarianceTests.hpp"
89 #include "es2fShaderFragDataTests.hpp"
90 
91 // State query tests
92 #include "es2fBooleanStateQueryTests.hpp"
93 #include "es2fIntegerStateQueryTests.hpp"
94 #include "es2fFloatStateQueryTests.hpp"
95 #include "es2fTextureStateQueryTests.hpp"
96 #include "es2fStringQueryTests.hpp"
97 #include "es2fBufferObjectQueryTests.hpp"
98 #include "es2fFboStateQueryTests.hpp"
99 #include "es2fRboStateQueryTests.hpp"
100 #include "es2fShaderStateQueryTests.hpp"
101 
102 #include "es2fReadPixelsTests.hpp"
103 #include "es2fDebugMarkerTests.hpp"
104 
105 namespace deqp
106 {
107 namespace gles2
108 {
109 namespace Functional
110 {
111 
112 // ShadersTestGroup
113 
114 class ShadersTestGroup : public TestCaseGroup
115 {
116 public:
ShadersTestGroup(Context & context)117 	ShadersTestGroup (Context& context)
118 		: TestCaseGroup(context, "shaders", "Shader Tests")
119 	{
120 	}
121 
~ShadersTestGroup(void)122 	virtual ~ShadersTestGroup (void)
123 	{
124 	}
125 
init(void)126 	virtual void init (void)
127 	{
128 		addChild(new ShaderExecuteTest(m_context, "preprocessor",					"Preprocessor Tests"));
129 		addChild(new ShaderExecuteTest(m_context, "constants",						"Constant Literal Tests"));
130 		addChild(new ShaderExecuteTest(m_context, "linkage",						"Linkage Tests"));
131 		addChild(new ShaderExecuteTest(m_context, "conversions",					"Type Conversion Tests"));
132 		addChild(new ShaderExecuteTest(m_context, "conditionals",					"Conditionals Tests"));
133 		addChild(new ShaderExecuteTest(m_context, "declarations",					"Declarations Tests"));
134 		addChild(new ShaderExecuteTest(m_context, "swizzles",						"Swizzle Tests"));
135 		addChild(new ShaderExecuteTest(m_context, "functions",						"Function Tests"));
136 		addChild(new ShaderExecuteTest(m_context, "keywords",						"Keyword Tests"));
137 		addChild(new ShaderExecuteTest(m_context, "reserved_operators",				"Reserved Operator Tests"));
138 		addChild(new ShaderExecuteTest(m_context, "qualification_order",			"Order of Qualification Tests"));
139 		addChild(new ShaderExecuteTest(m_context, "scoping",						"Scoping of Declarations"));
140 		addChild(new ShaderExecuteTest(m_context, "invalid_implicit_conversions",	"Invalid Implicit Conversions"));
141 		addChild(new ShaderExecuteTest(m_context, "misc",							"Miscellaneous Tests"));
142 
143 
144 		addChild(new ShaderIndexingTests		(m_context));
145 		addChild(new ShaderLoopTests			(m_context));
146 		addChild(new ShaderOperatorTests		(m_context));
147 		addChild(new ShaderMatrixTests			(m_context));
148 		addChild(new ShaderReturnTests			(m_context));
149 		addChild(new ShaderDiscardTests			(m_context));
150 		addChild(new ShaderStructTests			(m_context));
151 		addChild(new ShaderBuiltinVarTests		(m_context));
152 		addChild(new ShaderTextureFunctionTests	(m_context));
153 		addChild(new ShaderInvarianceTests		(m_context));
154 		addChild(new ShaderFragDataTests		(m_context));
155 		addChild(new ShaderAlgorithmTests		(m_context));
156 		addChild(new ShaderConstExprTests		(m_context));
157 
158 		addChild(new RandomShaderTests(m_context));
159 	}
160 };
161 
162 // TextureTestGroup
163 
164 class TextureTestGroup : public TestCaseGroup
165 {
166 public:
TextureTestGroup(Context & context)167 	TextureTestGroup (Context& context)
168 		: TestCaseGroup(context, "texture", "Texture Tests")
169 	{
170 	}
171 
~TextureTestGroup(void)172 	virtual ~TextureTestGroup (void)
173 	{
174 	}
175 
init(void)176 	virtual void init (void)
177 	{
178 		addChild(new TextureFormatTests			(m_context));
179 		addChild(new TextureSizeTests			(m_context));
180 		addChild(new TextureWrapTests			(m_context));
181 		addChild(new TextureFilteringTests		(m_context));
182 		addChild(new TextureMipmapTests			(m_context));
183 		addChild(new TextureSpecificationTests	(m_context));
184 		addChild(new TextureCompletenessTests	(m_context));
185 		addChild(new VertexTextureTests			(m_context));
186 		addChild(new TextureUnitTests			(m_context));
187 	}
188 
deinit(void)189 	virtual void deinit (void)
190 	{
191 	}
192 };
193 
194 class BufferTests : public TestCaseGroup
195 {
196 public:
BufferTests(Context & context)197 	BufferTests (Context& context)
198 		: TestCaseGroup(context, "buffer", "Buffer object tests")
199 	{
200 	}
201 
init(void)202 	void init (void)
203 	{
204 		addChild(new BufferWriteTests(m_context));
205 	}
206 };
207 
208 // FboTestGroup
209 
210 class FboTestGroup : public TestCaseGroup
211 {
212 public:
FboTestGroup(Context & context)213 	FboTestGroup (Context& context)
214 		: TestCaseGroup(context, "fbo", "Framebuffer Object Tests")
215 	{
216 	}
217 
~FboTestGroup(void)218 	virtual ~FboTestGroup (void)
219 	{
220 	}
221 
init(void)222 	virtual void init (void)
223 	{
224 		addChild(new FboApiTestGroup(m_context));
225 		addChild(new FboRenderTestGroup(m_context));
226 		addChild(createFboCompletenessTests(m_context));
227 	}
228 };
229 
230 // NegativeApiTestGroup
231 
232 class NegativeApiTestGroup : public TestCaseGroup
233 {
234 public:
NegativeApiTestGroup(Context & context)235 	NegativeApiTestGroup (Context& context)
236 		: TestCaseGroup(context, "negative_api", "Negative API Tests")
237 	{
238 	}
239 
~NegativeApiTestGroup(void)240 	virtual ~NegativeApiTestGroup (void)
241 	{
242 	}
243 
init(void)244 	virtual void init (void)
245 	{
246 		addChild(new NegativeBufferApiTests			(m_context));
247 		addChild(new NegativeFragmentApiTests		(m_context));
248 		addChild(new NegativeShaderApiTests			(m_context));
249 		addChild(new NegativeStateApiTests			(m_context));
250 		addChild(new NegativeTextureApiTests		(m_context));
251 		addChild(new NegativeVertexArrayApiTests	(m_context));
252 	}
253 };
254 
255 // FragmentOpTests
256 
257 class FragmentOpTests : public TestCaseGroup
258 {
259 public:
FragmentOpTests(Context & context)260 	FragmentOpTests (Context& context)
261 		: TestCaseGroup(context, "fragment_ops", "Per-Fragment Operation Tests")
262 	{
263 	}
264 
init(void)265 	void init (void)
266 	{
267 		addChild(new DepthTests				(m_context));
268 		addChild(new StencilTests			(m_context));
269 		addChild(new DepthStencilTests		(m_context));
270 		addChild(new ScissorTests			(m_context));
271 		addChild(new BlendTests				(m_context));
272 		addChild(new RandomFragmentOpTests	(m_context));
273 		addChild(new FragOpInteractionTests	(m_context));
274 	}
275 };
276 
277 // StateQueryTests
278 
279 class StateQueryTests : public TestCaseGroup
280 {
281 public:
StateQueryTests(Context & context)282 	StateQueryTests (Context& context)
283 		: TestCaseGroup(context, "state_query", "State Query Tests")
284 	{
285 	}
286 
init(void)287 	void init (void)
288 	{
289 		addChild(new BooleanStateQueryTests		(m_context));
290 		addChild(new IntegerStateQueryTests		(m_context));
291 		addChild(new FloatStateQueryTests		(m_context));
292 		addChild(new TextureStateQueryTests		(m_context));
293 		addChild(new StringQueryTests			(m_context));
294 		addChild(new BufferObjectQueryTests		(m_context));
295 		addChild(new FboStateQueryTests			(m_context));
296 		addChild(new RboStateQueryTests			(m_context));
297 		addChild(new ShaderStateQueryTests		(m_context));
298 	}
299 };
300 
301 // FunctionalTestGroup
302 
FunctionalTests(Context & context)303 FunctionalTests::FunctionalTests (Context& context)
304 	: TestCaseGroup(context, "functional", "Functionality Tests")
305 {
306 }
307 
~FunctionalTests(void)308 FunctionalTests::~FunctionalTests (void)
309 {
310 }
311 
init(void)312 void FunctionalTests::init (void)
313 {
314 	addChild(new PrerequisiteTests					(m_context));
315 	addChild(new ImplementationLimitTests			(m_context));
316 	addChild(new ClipControlTests					(m_context));
317 	addChild(new ColorClearTest						(m_context));
318 	addChild(new DepthStencilClearTests				(m_context));
319 	addChild(new BufferTests						(m_context));
320 	addChild(new LightAmountTest					(m_context));
321 	addChild(new MultisampledRenderToTextureTests	(m_context));
322 	addChild(new ShadersTestGroup					(m_context));
323 	addChild(new TextureTestGroup					(m_context));
324 	addChild(new FragmentOpTests					(m_context));
325 	addChild(new FboTestGroup						(m_context));
326 	addChild(new VertexArrayTestGroup				(m_context));
327 	addChild(new ShaderApiTests						(m_context));
328 	addChild(new NegativeApiTestGroup				(m_context));
329 	addChild(new RasterizationTests					(m_context));
330 	addChild(createAttributeLocationTests			(m_context));
331 	addChild(new MultisampleTests					(m_context));
332 	addChild(new UniformApiTests					(m_context));
333 	addChild(new ReadPixelsTests					(m_context));
334 	addChild(new DepthRangeTests					(m_context));
335 	addChild(new DitheringTests						(m_context));
336 	addChild(new StateQueryTests					(m_context));
337 	addChild(new ClippingTests						(m_context));
338 	addChild(new PolygonOffsetTests					(m_context));
339 	addChild(new DrawTests							(m_context));
340 	addChild(new FlushFinishTests					(m_context));
341 	addChild(new DefaultVertexAttributeTests		(m_context));
342 	addChild(createLifetimeTests					(m_context));
343 	addChild(createDebugMarkerTests					(m_context));
344 }
345 
346 } // Functional
347 } // gles2
348 } // deqp
349