dfb4cd2adcd33d6bea7669c31bf9581b2988c81f
[platform/upstream/VK-GL-CTS.git] / external / openglcts / modules / gl / gl4cTestPackages.cpp
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 "gl4cEnhancedLayoutsTests.hpp"
36 #include "gl4cGPUShaderFP64Tests.hpp"
37 #include "gl4cGetTextureSubImageTests.hpp"
38 #include "gl4cGlSpirvTests.hpp"
39 #include "gl4cIncompleteTextureAccessTests.hpp"
40 #include "gl4cIndirectParametersTests.hpp"
41 #include "gl4cLimitsTests.hpp"
42 #include "gl4cMapBufferAlignmentTests.hpp"
43 #include "gl4cMultiBindTests.hpp"
44 #include "gl4cPostDepthCoverageTests.hpp"
45 #include "gl4cProgramInterfaceQueryTests.hpp"
46 #include "gl4cShaderAtomicCounterOpsTests.hpp"
47 #include "gl4cShaderAtomicCountersTests.hpp"
48 #include "gl4cShaderBallotTests.hpp"
49 #include "gl4cShaderDrawParametersTests.hpp"
50 #include "gl4cShaderImageLoadStoreTests.hpp"
51 #include "gl4cShaderImageSizeTests.hpp"
52 #include "gl4cShaderStorageBufferObjectTests.hpp"
53 #include "gl4cShaderSubroutineTests.hpp"
54 #include "gl4cShaderTextureImageSamplesTests.hpp"
55 #include "gl4cShaderViewportLayerArrayTests.hpp"
56 #include "gl4cShadingLanguage420PackTests.hpp"
57 #include "gl4cSparseBufferTests.hpp"
58 #include "gl4cSparseTexture2Tests.hpp"
59 #include "gl4cSparseTextureClampTests.hpp"
60 #include "gl4cSparseTextureTests.hpp"
61 #include "gl4cSpirvExtensionsTests.hpp"
62 #include "gl4cStencilTexturingTests.hpp"
63 #include "gl4cSyncTests.hpp"
64 #include "gl4cTextureBarrierTests.hpp"
65 #include "gl4cTextureFilterMinmaxTests.hpp"
66 #include "gl4cTextureGatherTests.hpp"
67 #include "gl4cTextureViewTests.hpp"
68 #include "gl4cVertexAttrib64BitTest.hpp"
69 #include "gl4cVertexAttribBindingTests.hpp"
70 #include "glcAggressiveShaderOptimizationsTests.hpp"
71 #include "glcBlendEquationAdvancedTests.hpp"
72 #include "glcExposedExtensionsTests.hpp"
73 #include "glcInfoTests.hpp"
74 #include "glcInternalformatTests.hpp"
75 #include "glcLayoutLocationTests.hpp"
76 #include "glcParallelShaderCompileTests.hpp"
77 #include "glcPolygonOffsetClampTests.hpp"
78 #include "glcSampleVariablesTests.hpp"
79 #include "glcSeparableProgramsTransformFeedbackTests.hpp"
80 #include "glcShaderConstExprTests.hpp"
81 #include "glcShaderGroupVoteTests.hpp"
82 #include "glcShaderIntegerMixTests.hpp"
83 #include "glcShaderLibrary.hpp"
84 #include "glcShaderMultisampleInterpolationTests.hpp"
85 #include "glcTextureFilterAnisotropicTests.hpp"
86 #include "glcViewportArrayTests.hpp"
87
88 #include "../gles31/es31cArrayOfArraysTests.hpp"
89 #include "../gles31/es31cDrawIndirectTests.hpp"
90 #include "../gles31/es31cExplicitUniformLocationTest.hpp"
91 #include "../gles31/es31cLayoutBindingTests.hpp"
92 #include "../gles31/es31cSampleShadingTests.hpp"
93 #include "../gles31/es31cSeparateShaderObjsTests.hpp"
94 #include "../gles31/es31cShaderBitfieldOperationTests.hpp"
95 #include "../glesext/draw_elements_base_vertex/esextcDrawElementsBaseVertexTests.hpp"
96 #include "../glesext/geometry_shader/esextcGeometryShaderTests.hpp"
97 #include "../glesext/gpu_shader5/esextcGPUShader5Tests.hpp"
98 #include "../glesext/tessellation_shader/esextcTessellationShaderTests.hpp"
99 #include "../glesext/texture_border_clamp/esextcTextureBorderClampTests.hpp"
100 #include "../glesext/texture_buffer/esextcTextureBufferTests.hpp"
101 #include "../glesext/texture_cube_map_array/esextcTextureCubeMapArrayTests.hpp"
102
103 namespace gl4cts
104 {
105
106 // GL40TestPackage
107
108 GL40TestPackage::GL40TestPackage(tcu::TestContext& testCtx, const char* packageName, const char* description,
109                                                                  glu::ContextType renderContextType)
110         : GL33TestPackage(testCtx, packageName, packageName, renderContextType)
111 {
112         (void)description;
113 }
114
115 GL40TestPackage::~GL40TestPackage(void)
116 {
117 }
118
119 void GL40TestPackage::init(void)
120 {
121         // Call init() in parent - this creates context.
122         GL33TestPackage::init();
123
124         try
125         {
126                 glcts::ExtParameters extParams(glu::GLSL_VERSION_400, glcts::EXTENSIONTYPE_NONE);
127                 addChild(new glcts::DrawElementsBaseVertexTests(getContext(), extParams));
128                 addChild(new glcts::InternalformatTests(getContext()));
129                 addChild(new gl4cts::GPUShaderFP64Tests(getContext()));
130                 addChild(new gl4cts::TextureGatherTests(getContext()));
131                 addChild(new glcts::DrawIndirectTestsGL40(getContext()));
132                 addChild(new gl4cts::ClipControlTests(getContext(), gl4cts::ClipControlTests::API_GL_ARB_clip_control));
133                 addChild(new gl4cts::ShaderSubroutineTests(getContext()));
134                 addChild(
135                         new gl4cts::TextureBarrierTests(getContext(), gl4cts::TextureBarrierTests::API_GL_ARB_texture_barrier));
136                 addChild(new glcts::ExposedExtensionsTests(getContext()));
137         }
138         catch (...)
139         {
140                 // Destroy context.
141                 TestPackage::deinit();
142                 throw;
143         }
144 }
145
146 // GL41TestPackage
147
148 GL41TestPackage::GL41TestPackage(tcu::TestContext& testCtx, const char* packageName, const char* description,
149                                                                  glu::ContextType renderContextType)
150         : GL40TestPackage(testCtx, packageName, packageName, renderContextType)
151 {
152         (void)description;
153 }
154
155 GL41TestPackage::~GL41TestPackage(void)
156 {
157 }
158
159 void GL41TestPackage::init(void)
160 {
161         // Call init() in parent - this creates context.
162         GL40TestPackage::init();
163
164         try
165         {
166                 addChild(new gl4cts::VertexAttrib64BitTests(getContext()));
167                 glcts::ExtParameters extParams(glu::GLSL_VERSION_410, glcts::EXTENSIONTYPE_NONE);
168                 addChild(new glcts::ViewportArrayTests(getContext(), extParams));
169         }
170         catch (...)
171         {
172                 // Destroy context.
173                 TestPackage::deinit();
174                 throw;
175         }
176 }
177
178 // GL42TestPackage
179
180 class GL42ShaderTests : public deqp::TestCaseGroup
181 {
182 public:
183         GL42ShaderTests(deqp::Context& context) : TestCaseGroup(context, "shaders42", "Shading Language Tests")
184         {
185         }
186
187         void init(void)
188         {
189                 addChild(new deqp::ShaderLibraryGroup(m_context, "declarations", "Declaration Tests", "gl42/declarations.test"));
190         }
191 };
192
193 GL42TestPackage::GL42TestPackage(tcu::TestContext& testCtx, const char* packageName, const char* description,
194                                                                  glu::ContextType renderContextType)
195         : GL41TestPackage(testCtx, packageName, packageName, renderContextType)
196 {
197         (void)description;
198 }
199
200 GL42TestPackage::~GL42TestPackage(void)
201 {
202 }
203
204 void GL42TestPackage::init(void)
205 {
206         // Call init() in parent - this creates context.
207         GL41TestPackage::init();
208
209         try
210         {
211                 addChild(new gl4cts::MapBufferAlignmentTests(getContext()));
212                 addChild(new gl4cts::ShaderAtomicCountersTests(getContext()));
213                 addChild(new gl4cts::ShaderImageLoadStoreTests(getContext()));
214                 addChild(new gl4cts::ShadingLanguage420PackTests(getContext()));
215                 addChild(new gl4cts::TextureViewTests(getContext()));
216                 addChild(new GL42ShaderTests(getContext()));
217         }
218         catch (...)
219         {
220                 // Destroy context.
221                 TestPackage::deinit();
222                 throw;
223         }
224 }
225
226 // GL43TestPackage
227
228 GL43TestPackage::GL43TestPackage(tcu::TestContext& testCtx, const char* packageName, const char* description,
229                                                                  glu::ContextType renderContextType)
230         : GL42TestPackage(testCtx, packageName, packageName, renderContextType)
231 {
232         (void)description;
233 }
234
235 GL43TestPackage::~GL43TestPackage(void)
236 {
237 }
238
239 void GL43TestPackage::init(void)
240 {
241         // Call init() in parent - this creates context.
242         GL42TestPackage::init();
243
244         try
245         {
246                 addChild(new glcts::ArrayOfArraysTestGroupGL(getContext()));
247                 addChild(new gl4cts::CopyImageTests(getContext()));
248                 addChild(new glcts::DrawIndirectTestsGL43(getContext()));
249                 addChild(new gl4cts::ProgramInterfaceQueryTests(getContext()));
250                 addChild(new gl4cts::ComputeShaderTests(getContext()));
251                 addChild(new gl4cts::ShaderStorageBufferObjectTests(getContext()));
252                 addChild(new gl4cts::VertexAttribBindingTests(getContext()));
253                 addChild(new gl4cts::ShaderImageSizeTests(getContext()));
254                 addChild(new glcts::ExplicitUniformLocationGLTests(getContext()));
255                 addChild(new glcts::BlendEquationAdvancedTests(getContext(), glu::GLSL_VERSION_430));
256                 addChild(new glcts::ShaderBitfieldOperationTests(getContext(), glu::GLSL_VERSION_430));
257                 addChild(new gl4cts::StencilTexturingTests(getContext()));
258                 addChild(new gl4cts::SparseBufferTests(getContext()));
259                 addChild(new gl4cts::SparseTextureTests(getContext()));
260                 addChild(new gl4cts::IndirectParametersTests(getContext()));
261                 addChild(new gl4cts::ShaderBallotTests(getContext()));
262                 addChild(new glcts::ShaderConstExprTests(getContext()));
263                 addChild(new glcts::AggressiveShaderOptimizationsTests(getContext()));
264         }
265         catch (...)
266         {
267                 // Destroy context.
268                 TestPackage::deinit();
269                 throw;
270         }
271 }
272
273 // GL44TestPackage
274
275 class GL44ShaderTests : public deqp::TestCaseGroup
276 {
277 public:
278         GL44ShaderTests(deqp::Context& context) : TestCaseGroup(context, "shaders44", "Shading Language Tests")
279         {
280         }
281
282         void init(void)
283         {
284                 addChild(
285                         new deqp::ShaderLibraryGroup(m_context, "preprocessor", "Preprocessor Tests", "gl44/preprocessor.test"));
286         }
287 };
288
289 GL44TestPackage::GL44TestPackage(tcu::TestContext& testCtx, const char* packageName, const char* description,
290                                                                  glu::ContextType renderContextType)
291         : GL43TestPackage(testCtx, packageName, packageName, renderContextType)
292 {
293         (void)description;
294 }
295
296 GL44TestPackage::~GL44TestPackage(void)
297 {
298 }
299
300 void GL44TestPackage::init(void)
301 {
302         // Call init() in parent - this creates context.
303         GL43TestPackage::init();
304
305         try
306         {
307                 addChild(new GL44ShaderTests(getContext()));
308                 addChild(new gl4cts::BufferStorageTests(getContext()));
309                 addChild(new gl4cts::EnhancedLayoutsTests(getContext()));
310                 addChild(new glcts::LayoutBindingTests(getContext(), glu::GLSL_VERSION_440));
311                 addChild(new gl4cts::MultiBindTests(getContext()));
312                 addChild(new glcts::SeparateShaderObjsTests(getContext(), glu::GLSL_VERSION_440));
313                 addChild(new glcts::SampleShadingTests(getContext(), glu::GLSL_VERSION_440));
314                 addChild(new deqp::SampleVariablesTests(getContext(), glu::GLSL_VERSION_440));
315                 addChild(new deqp::ShaderMultisampleInterpolationTests(getContext(), glu::GLSL_VERSION_440));
316                 addChild(new glcts::ShaderTextureImageSamplesTests(getContext()));
317                 addChild(new glcts::TextureFilterAnisotropicTests(getContext()));
318
319                 glcts::ExtParameters extParams(glu::GLSL_VERSION_440, glcts::EXTENSIONTYPE_NONE);
320                 addChild(new glcts::GeometryShaderTests(getContext(), extParams));
321                 addChild(new glcts::GPUShader5Tests(getContext(), extParams));
322                 addChild(new glcts::TessellationShaderTests(getContext(), extParams));
323                 addChild(new glcts::TextureCubeMapArrayTests(getContext(), extParams));
324                 addChild(new glcts::TextureBorderClampTests(getContext(), extParams));
325                 addChild(new glcts::TextureBufferTests(getContext(), extParams));
326
327                 //addChild(new gl4cts::ContextFlushControl::Tests(getContext()));
328         }
329         catch (...)
330         {
331                 // Destroy context.
332                 TestPackage::deinit();
333                 throw;
334         }
335 }
336
337 // GL45TestPackage
338
339 class GL45ShaderTests : public deqp::TestCaseGroup
340 {
341 public:
342         GL45ShaderTests(deqp::Context& context) : TestCaseGroup(context, "shaders45", "Shading Language Tests")
343         {
344         }
345
346         void init(void)
347         {
348                 addChild(new deqp::ShaderIntegerMixTests(getContext(), glu::GLSL_VERSION_450));
349         }
350 };
351
352 GL45TestPackage::GL45TestPackage(tcu::TestContext& testCtx, const char* packageName, const char* description,
353                                                                  glu::ContextType renderContextType)
354         : GL44TestPackage(testCtx, packageName, packageName, renderContextType)
355 {
356         (void)description;
357 }
358
359 GL45TestPackage::~GL45TestPackage(void)
360 {
361 }
362
363 void GL45TestPackage::init(void)
364 {
365         // Call init() in parent - this creates context.
366         GL44TestPackage::init();
367
368         try
369         {
370                 addChild(new GL45ShaderTests(getContext()));
371                 addChild(new gl4cts::ClipControlTests(getContext(), gl4cts::ClipControlTests::API_GL_45core));
372                 addChild(new gl4cts::DirectStateAccess::Tests(getContext()));
373                 addChild(new gl4cts::GetTextureSubImage::Tests(getContext()));
374                 addChild(new gl4cts::TextureBarrierTests(getContext(), gl4cts::TextureBarrierTests::API_GL_45core));
375                 addChild(new gl4cts::ConditionalRenderInverted::Tests(getContext()));
376                 addChild(new gl4cts::Sync::Tests(getContext()));
377                 addChild(new gl4cts::IncompleteTextureAccess::Tests(getContext()));
378                 addChild(new glcts::ParallelShaderCompileTests(getContext()));
379                 addChild(new gl4cts::PostDepthCoverage(getContext()));
380                 addChild(new gl4cts::SparseTexture2Tests(getContext()));
381                 addChild(new gl4cts::SparseTextureClampTests(getContext()));
382                 addChild(new gl4cts::TextureFilterMinmax(getContext()));
383                 addChild(new gl4cts::ShaderAtomicCounterOps(getContext()));
384                 addChild(new gl4cts::ShaderDrawParametersTests(getContext()));
385                 addChild(new gl4cts::ShaderViewportLayerArray(getContext()));
386                 addChild(new gl4cts::LimitsTests(getContext()));
387                 addChild(new glcts::ShaderGroupVote(getContext()));
388                 addChild(new glcts::PolygonOffsetClamp(getContext()));
389                 addChild(new glcts::SeparableProgramsTransformFeedbackTests(getContext()));
390                 addChild(new glcts::LayoutLocationTests(getContext()));
391                 addChild(new gl4cts::SpirvExtensionsTests(getContext()));
392                 addChild(new gl4cts::GlSpirvTests(getContext()));
393         }
394         catch (...)
395         {
396                 // Destroy context.
397                 TestPackage::deinit();
398                 throw;
399         }
400 }
401
402 GL46TestPackage::GL46TestPackage(tcu::TestContext& testCtx, const char* packageName, const char* description,
403                                                                  glu::ContextType renderContextType)
404         : GL45TestPackage(testCtx, packageName, packageName, renderContextType)
405 {
406         (void)description;
407 }
408
409 GL46TestPackage::~GL46TestPackage(void)
410 {
411 }
412
413 void GL46TestPackage::init(void)
414 {
415         // Call init() in parent - this creates context.
416         GL45TestPackage::init();
417 }
418
419 } // gl4cts