• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*-------------------------------------------------------------------------
2  * OpenGL Conformance Test Suite
3  * -----------------------------
4  *
5  * Copyright (c) 2016 Google Inc.
6  * Copyright (c) 2016 The Khronos Group Inc.
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *      http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */ /*!
21  * \file
22  * \brief OpenGL 4.x Test Packages.
23  */ /*-------------------------------------------------------------------*/
24 
25 #include "gl4cTestPackages.hpp"
26 
27 #include "gl4cBufferStorageTests.hpp"
28 #include "gl4cClipControlTests.hpp"
29 #include "gl4cComputeShaderTests.hpp"
30 #include "gl4cConditionalRenderInvertedTests.hpp"
31 #include "gl4cContextFlushControlTests.hpp"
32 #include "gl4cCopyImageTests.hpp"
33 #include "gl4cDirectStateAccessTests.hpp"
34 #include "gl4cES31CompatibilityTests.hpp"
35 #include "gl4cGPUShaderFP64Tests.hpp"
36 #include "gl4cGetTextureSubImageTests.hpp"
37 #include "gl4cGlSpirvTests.hpp"
38 #include "gl4cIncompleteTextureAccessTests.hpp"
39 #include "gl4cIndirectParametersTests.hpp"
40 #include "gl4cLimitsTests.hpp"
41 #include "gl4cMapBufferAlignmentTests.hpp"
42 #include "gl4cMultiBindTests.hpp"
43 #include "gl4cPostDepthCoverageTests.hpp"
44 #include "gl4cProgramInterfaceQueryTests.hpp"
45 #include "gl4cShaderAtomicCounterOpsTests.hpp"
46 #include "gl4cShaderAtomicCountersTests.hpp"
47 #include "gl4cShaderBallotTests.hpp"
48 #include "gl4cShaderDrawParametersTests.hpp"
49 #include "gl4cShaderImageLoadStoreTests.hpp"
50 #include "gl4cShaderImageSizeTests.hpp"
51 #include "gl4cShaderStorageBufferObjectTests.hpp"
52 #include "gl4cShaderSubroutineTests.hpp"
53 #include "gl4cShaderTextureImageSamplesTests.hpp"
54 #include "gl4cShaderViewportLayerArrayTests.hpp"
55 #include "gl4cShadingLanguage420PackTests.hpp"
56 #include "gl4cSparseBufferTests.hpp"
57 #include "gl4cSparseTexture2Tests.hpp"
58 #include "gl4cSparseTextureClampTests.hpp"
59 #include "gl4cSparseTextureTests.hpp"
60 #include "gl4cSpirvExtensionsTests.hpp"
61 #include "gl4cStencilTexturingTests.hpp"
62 #include "gl4cSyncTests.hpp"
63 #include "gl4cTextureBarrierTests.hpp"
64 #include "gl4cTextureFilterMinmaxTests.hpp"
65 #include "gl4cTextureGatherTests.hpp"
66 #include "gl4cTextureViewTests.hpp"
67 #include "gl4cVertexAttrib64BitTest.hpp"
68 #include "gl4cVertexAttribBindingTests.hpp"
69 #include "glcAggressiveShaderOptimizationsTests.hpp"
70 #include "glcBlendEquationAdvancedTests.hpp"
71 #include "glcExposedExtensionsTests.hpp"
72 #include "glcInfoTests.hpp"
73 #include "glcInternalformatTests.hpp"
74 #include "glcLayoutLocationTests.hpp"
75 #include "glcParallelShaderCompileTests.hpp"
76 #include "glcPolygonOffsetClampTests.hpp"
77 #include "glcSampleVariablesTests.hpp"
78 #include "glcSeparableProgramsTransformFeedbackTests.hpp"
79 #include "glcShaderConstExprTests.hpp"
80 #include "glcShaderGroupVoteTests.hpp"
81 #include "glcShaderIntegerMixTests.hpp"
82 #include "glcShaderLibrary.hpp"
83 #include "glcShaderMultisampleInterpolationTests.hpp"
84 #include "glcTextureFilterAnisotropicTests.hpp"
85 #include "glcViewportArrayTests.hpp"
86 #include "glcPixelStorageModesTests.hpp"
87 
88 #include "../gles31/es31cDrawIndirectTests.hpp"
89 #include "../gles31/es31cExplicitUniformLocationTest.hpp"
90 #include "../gles31/es31cLayoutBindingTests.hpp"
91 #include "../gles31/es31cSampleShadingTests.hpp"
92 #include "../gles31/es31cSeparateShaderObjsTests.hpp"
93 #include "../gles31/es31cShaderBitfieldOperationTests.hpp"
94 #include "../glesext/draw_elements_base_vertex/esextcDrawElementsBaseVertexTests.hpp"
95 #include "../glesext/geometry_shader/esextcGeometryShaderTests.hpp"
96 #include "../glesext/gpu_shader5/esextcGPUShader5Tests.hpp"
97 #include "../glesext/tessellation_shader/esextcTessellationShaderTests.hpp"
98 #include "../glesext/texture_border_clamp/esextcTextureBorderClampTests.hpp"
99 #include "../glesext/texture_buffer/esextcTextureBufferTests.hpp"
100 #include "../glesext/texture_cube_map_array/esextcTextureCubeMapArrayTests.hpp"
101 
102 namespace gl4cts
103 {
104 
105 // GL40TestPackage
106 
GL40TestPackage(tcu::TestContext & testCtx,const char * packageName,const char * description,glu::ContextType renderContextType)107 GL40TestPackage::GL40TestPackage(tcu::TestContext& testCtx, const char* packageName, const char* description,
108 								 glu::ContextType renderContextType)
109 	: GL33TestPackage(testCtx, packageName, packageName, renderContextType)
110 {
111 	(void)description;
112 }
113 
~GL40TestPackage(void)114 GL40TestPackage::~GL40TestPackage(void)
115 {
116 }
117 
init(void)118 void GL40TestPackage::init(void)
119 {
120 	// Call init() in parent - this creates context.
121 	GL33TestPackage::init();
122 
123 	try
124 	{
125 		glcts::ExtParameters extParams(glu::GLSL_VERSION_400, glcts::EXTENSIONTYPE_NONE);
126 		addChild(new glcts::DrawElementsBaseVertexTests(getContext(), extParams));
127 		addChild(new glcts::InternalformatTests(getContext()));
128 		addChild(new gl4cts::GPUShaderFP64Tests(getContext()));
129 		addChild(new gl4cts::TextureGatherTests(getContext()));
130 		addChild(new glcts::DrawIndirectTestsGL40(getContext()));
131 		addChild(new gl4cts::ClipControlTests(getContext(), gl4cts::ClipControlTests::API_GL_ARB_clip_control));
132 		addChild(new gl4cts::ShaderSubroutineTests(getContext()));
133 		addChild(
134 			new gl4cts::TextureBarrierTests(getContext(), gl4cts::TextureBarrierTests::API_GL_ARB_texture_barrier));
135 		addChild(new glcts::ExposedExtensionsTests(getContext()));
136 	}
137 	catch (...)
138 	{
139 		// Destroy context.
140 		TestPackage::deinit();
141 		throw;
142 	}
143 }
144 
145 // GL41TestPackage
146 
GL41TestPackage(tcu::TestContext & testCtx,const char * packageName,const char * description,glu::ContextType renderContextType)147 GL41TestPackage::GL41TestPackage(tcu::TestContext& testCtx, const char* packageName, const char* description,
148 								 glu::ContextType renderContextType)
149 	: GL40TestPackage(testCtx, packageName, packageName, renderContextType)
150 {
151 	(void)description;
152 }
153 
~GL41TestPackage(void)154 GL41TestPackage::~GL41TestPackage(void)
155 {
156 }
157 
init(void)158 void GL41TestPackage::init(void)
159 {
160 	// Call init() in parent - this creates context.
161 	GL40TestPackage::init();
162 
163 	try
164 	{
165 		addChild(new gl4cts::VertexAttrib64BitTests(getContext()));
166 		glcts::ExtParameters extParams(glu::GLSL_VERSION_410, glcts::EXTENSIONTYPE_NONE);
167 		addChild(new glcts::ViewportArrayTests(getContext(), extParams));
168 	}
169 	catch (...)
170 	{
171 		// Destroy context.
172 		TestPackage::deinit();
173 		throw;
174 	}
175 }
176 
177 // GL42TestPackage
178 
179 class GL42ShaderTests : public deqp::TestCaseGroup
180 {
181 public:
GL42ShaderTests(deqp::Context & context)182 	GL42ShaderTests(deqp::Context& context) : TestCaseGroup(context, "shaders42", "Shading Language Tests")
183 	{
184 	}
185 
init(void)186 	void init(void)
187 	{
188 		addChild(new deqp::ShaderLibraryGroup(m_context, "declarations", "Declaration Tests", "gl42/declarations.test"));
189 	}
190 };
191 
GL42TestPackage(tcu::TestContext & testCtx,const char * packageName,const char * description,glu::ContextType renderContextType)192 GL42TestPackage::GL42TestPackage(tcu::TestContext& testCtx, const char* packageName, const char* description,
193 								 glu::ContextType renderContextType)
194 	: GL41TestPackage(testCtx, packageName, packageName, renderContextType)
195 {
196 	(void)description;
197 }
198 
~GL42TestPackage(void)199 GL42TestPackage::~GL42TestPackage(void)
200 {
201 }
202 
init(void)203 void GL42TestPackage::init(void)
204 {
205 	// Call init() in parent - this creates context.
206 	GL41TestPackage::init();
207 
208 	try
209 	{
210 		addChild(new gl4cts::MapBufferAlignmentTests(getContext()));
211 		addChild(new gl4cts::ShaderAtomicCountersTests(getContext()));
212 		addChild(new gl4cts::ShaderImageLoadStoreTests(getContext()));
213 		addChild(new gl4cts::ShadingLanguage420PackTests(getContext()));
214 		addChild(new gl4cts::TextureViewTests(getContext()));
215 		addChild(new GL42ShaderTests(getContext()));
216 	}
217 	catch (...)
218 	{
219 		// Destroy context.
220 		TestPackage::deinit();
221 		throw;
222 	}
223 }
224 
225 // GL42CompatTestPackage
226 
227 class GL42CompatShaderTests : public deqp::TestCaseGroup
228 {
229 public:
GL42CompatShaderTests(deqp::Context & context)230 	GL42CompatShaderTests(deqp::Context& context) : TestCaseGroup(context, "shaders42", "Shading Language Tests")
231 	{
232 	}
233 
init(void)234 	void init(void)
235 	{
236                 addChild(new deqp::ShaderLibraryGroup(m_context, "builtin", "Builtin Tests", "gl42-compat/builtins.test"));
237                 addChild(new deqp::ShaderLibraryGroup(m_context, "varying", "Varying Tests", "gl42-compat/varyings.test"));
238 	}
239 };
240 
GL42CompatTestPackage(tcu::TestContext & testCtx,const char * packageName,const char * description,glu::ContextType renderContextType)241 GL42CompatTestPackage::GL42CompatTestPackage(tcu::TestContext& testCtx, const char* packageName, const char* description,
242 								 glu::ContextType renderContextType)
243 	: TestPackage(testCtx, packageName, packageName, renderContextType, "gl_cts/data/")
244 {
245 	(void)description;
246 }
247 
~GL42CompatTestPackage(void)248 GL42CompatTestPackage::~GL42CompatTestPackage(void)
249 {
250 }
251 
init(void)252 void GL42CompatTestPackage::init(void)
253 {
254 	// Call init() in parent - this creates context.
255 	TestPackage::init();
256 
257 	try
258 	{
259 		addChild(new GL42CompatShaderTests(getContext()));
260 	}
261 	catch (...)
262 	{
263 		// Destroy context.
264 		TestPackage::deinit();
265 		throw;
266 	}
267 }
268 
createExecutor(void) const269 tcu::TestCaseExecutor* GL42CompatTestPackage::createExecutor(void) const
270 {
271 	return new gl3cts::TestCaseWrapper(const_cast<GL42CompatTestPackage&>(*this), m_waiverMechanism);
272 }
273 
274 // GL43TestPackage
275 
GL43TestPackage(tcu::TestContext & testCtx,const char * packageName,const char * description,glu::ContextType renderContextType)276 GL43TestPackage::GL43TestPackage(tcu::TestContext& testCtx, const char* packageName, const char* description,
277 								 glu::ContextType renderContextType)
278 	: GL42TestPackage(testCtx, packageName, packageName, renderContextType)
279 {
280 	(void)description;
281 }
282 
~GL43TestPackage(void)283 GL43TestPackage::~GL43TestPackage(void)
284 {
285 }
286 
init(void)287 void GL43TestPackage::init(void)
288 {
289 	// Call init() in parent - this creates context.
290 	GL42TestPackage::init();
291 
292 	try
293 	{
294 		addChild(new gl4cts::CopyImageTests(getContext()));
295 		addChild(new glcts::DrawIndirectTestsGL43(getContext()));
296 		addChild(new gl4cts::ProgramInterfaceQueryTests(getContext()));
297 		addChild(new gl4cts::ComputeShaderTests(getContext()));
298 		addChild(new gl4cts::ShaderStorageBufferObjectTests(getContext()));
299 		addChild(new gl4cts::VertexAttribBindingTests(getContext()));
300 		addChild(new gl4cts::ShaderImageSizeTests(getContext()));
301 		addChild(new glcts::ExplicitUniformLocationGLTests(getContext()));
302 		addChild(new glcts::BlendEquationAdvancedTests(getContext(), glu::GLSL_VERSION_430));
303 		addChild(new glcts::ShaderBitfieldOperationTests(getContext(), glu::GLSL_VERSION_430));
304 		addChild(new gl4cts::StencilTexturingTests(getContext()));
305 		addChild(new gl4cts::SparseBufferTests(getContext()));
306 		addChild(new gl4cts::SparseTextureTests(getContext()));
307 		addChild(new gl4cts::IndirectParametersTests(getContext()));
308 		addChild(new gl4cts::ShaderBallotTests(getContext()));
309 		addChild(new glcts::ShaderConstExprTests(getContext()));
310 		addChild(new glcts::AggressiveShaderOptimizationsTests(getContext()));
311 	}
312 	catch (...)
313 	{
314 		// Destroy context.
315 		TestPackage::deinit();
316 		throw;
317 	}
318 }
319 
320 // GL44TestPackage
321 
322 class GL44ShaderTests : public deqp::TestCaseGroup
323 {
324 public:
GL44ShaderTests(deqp::Context & context)325 	GL44ShaderTests(deqp::Context& context) : TestCaseGroup(context, "shaders44", "Shading Language Tests")
326 	{
327 	}
328 
init(void)329 	void init(void)
330 	{
331 		addChild(
332 			new deqp::ShaderLibraryGroup(m_context, "preprocessor", "Preprocessor Tests", "gl44/preprocessor.test"));
333 	}
334 };
335 
GL44TestPackage(tcu::TestContext & testCtx,const char * packageName,const char * description,glu::ContextType renderContextType)336 GL44TestPackage::GL44TestPackage(tcu::TestContext& testCtx, const char* packageName, const char* description,
337 								 glu::ContextType renderContextType)
338 	: GL43TestPackage(testCtx, packageName, packageName, renderContextType)
339 {
340 	(void)description;
341 }
342 
~GL44TestPackage(void)343 GL44TestPackage::~GL44TestPackage(void)
344 {
345 }
346 
init(void)347 void GL44TestPackage::init(void)
348 {
349 	// Call init() in parent - this creates context.
350 	GL43TestPackage::init();
351 
352 	try
353 	{
354 		addChild(new GL44ShaderTests(getContext()));
355 		addChild(new gl4cts::BufferStorageTests(getContext()));
356 		addChild(new glcts::LayoutBindingTests(getContext(), glu::GLSL_VERSION_440));
357 		addChild(new gl4cts::MultiBindTests(getContext()));
358 		addChild(new glcts::SeparateShaderObjsTests(getContext(), glu::GLSL_VERSION_440));
359 		addChild(new glcts::SampleShadingTests(getContext(), glu::GLSL_VERSION_440));
360 		addChild(new deqp::SampleVariablesTests(getContext(), glu::GLSL_VERSION_440));
361 		addChild(new deqp::ShaderMultisampleInterpolationTests(getContext(), glu::GLSL_VERSION_440));
362 		addChild(new glcts::ShaderTextureImageSamplesTests(getContext()));
363 		addChild(new glcts::TextureFilterAnisotropicTests(getContext()));
364 
365 		glcts::ExtParameters extParams(glu::GLSL_VERSION_440, glcts::EXTENSIONTYPE_NONE);
366 		addChild(new glcts::GeometryShaderTests(getContext(), extParams));
367 		addChild(new glcts::GPUShader5Tests(getContext(), extParams));
368 		addChild(new glcts::TessellationShaderTests(getContext(), extParams));
369 		addChild(new glcts::TextureCubeMapArrayTests(getContext(), extParams));
370 		addChild(new glcts::TextureBorderClampTests(getContext(), extParams));
371 		addChild(new glcts::TextureBufferTests(getContext(), extParams));
372 
373 		//addChild(new gl4cts::ContextFlushControl::Tests(getContext()));
374 	}
375 	catch (...)
376 	{
377 		// Destroy context.
378 		TestPackage::deinit();
379 		throw;
380 	}
381 }
382 
383 // GL45TestPackage
384 
385 class GL45ShaderTests : public deqp::TestCaseGroup
386 {
387 public:
GL45ShaderTests(deqp::Context & context)388 	GL45ShaderTests(deqp::Context& context) : TestCaseGroup(context, "shaders45", "Shading Language Tests")
389 	{
390 	}
391 
init(void)392 	void init(void)
393 	{
394 		addChild(new deqp::ShaderIntegerMixTests(getContext(), glu::GLSL_VERSION_450));
395 	}
396 };
397 
GL45TestPackage(tcu::TestContext & testCtx,const char * packageName,const char * description,glu::ContextType renderContextType)398 GL45TestPackage::GL45TestPackage(tcu::TestContext& testCtx, const char* packageName, const char* description,
399 								 glu::ContextType renderContextType)
400 	: GL44TestPackage(testCtx, packageName, packageName, renderContextType)
401 {
402 	(void)description;
403 }
404 
~GL45TestPackage(void)405 GL45TestPackage::~GL45TestPackage(void)
406 {
407 }
408 
init(void)409 void GL45TestPackage::init(void)
410 {
411 	// Call init() in parent - this creates context.
412 	GL44TestPackage::init();
413 
414 	try
415 	{
416 		addChild(new GL45ShaderTests(getContext()));
417 		addChild(new gl4cts::ClipControlTests(getContext(), gl4cts::ClipControlTests::API_GL_45core));
418 		addChild(new gl4cts::DirectStateAccess::Tests(getContext()));
419 		addChild(new gl4cts::GetTextureSubImage::Tests(getContext()));
420 		addChild(new gl4cts::TextureBarrierTests(getContext(), gl4cts::TextureBarrierTests::API_GL_45core));
421 		addChild(new gl4cts::ConditionalRenderInverted::Tests(getContext()));
422 		addChild(new gl4cts::Sync::Tests(getContext()));
423 		addChild(new gl4cts::IncompleteTextureAccess::Tests(getContext()));
424 		addChild(new glcts::ParallelShaderCompileTests(getContext()));
425 		addChild(new gl4cts::PostDepthCoverage(getContext()));
426 		addChild(new gl4cts::SparseTexture2Tests(getContext()));
427 		addChild(new gl4cts::SparseTextureClampTests(getContext()));
428 		addChild(new gl4cts::TextureFilterMinmax(getContext()));
429 		addChild(new gl4cts::ShaderAtomicCounterOps(getContext()));
430 		addChild(new gl4cts::ShaderDrawParametersTests(getContext()));
431 		addChild(new gl4cts::ShaderViewportLayerArray(getContext()));
432 		addChild(new gl4cts::LimitsTests(getContext()));
433 		addChild(new glcts::ShaderGroupVote(getContext()));
434 		addChild(new glcts::PolygonOffsetClamp(getContext()));
435 		addChild(new glcts::SeparableProgramsTransformFeedbackTests(getContext()));
436 		addChild(new glcts::LayoutLocationTests(getContext()));
437 		addChild(new gl4cts::SpirvExtensionsTests(getContext()));
438 		addChild(new gl4cts::GlSpirvTests(getContext()));
439 	}
440 	catch (...)
441 	{
442 		// Destroy context.
443 		TestPackage::deinit();
444 		throw;
445 	}
446 }
447 
GL46TestPackage(tcu::TestContext & testCtx,const char * packageName,const char * description,glu::ContextType renderContextType)448 GL46TestPackage::GL46TestPackage(tcu::TestContext& testCtx, const char* packageName, const char* description,
449 								 glu::ContextType renderContextType)
450 	: GL45TestPackage(testCtx, packageName, packageName, renderContextType)
451 {
452 	(void)description;
453 }
454 
~GL46TestPackage(void)455 GL46TestPackage::~GL46TestPackage(void)
456 {
457 }
458 
init(void)459 void GL46TestPackage::init(void)
460 {
461 	// Call init() in parent - this creates context.
462 	GL45TestPackage::init();
463 }
464 
465 } // gl4cts
466