Try to determine renderable format in lifetime tests am: c0a5dc217f am: eba26e2387
[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 "gl4cIncompleteTextureAccessTests.hpp"
39 #include "gl4cIndirectParametersTests.hpp"
40 #include "gl4cKHRDebugTests.hpp"
41 #include "gl4cMapBufferAlignmentTests.hpp"
42 #include "gl4cMultiBindTests.hpp"
43 #include "gl4cParallelShaderCompileTests.hpp"
44 #include "gl4cPostDepthCoverageTests.hpp"
45 #include "gl4cProgramInterfaceQueryTests.hpp"
46 #include "gl4cRobustnessTests.hpp"
47 #include "gl4cShaderAtomicCountersTests.hpp"
48 #include "gl4cShaderImageLoadStoreTests.hpp"
49 #include "gl4cShaderImageSizeTests.hpp"
50 #include "gl4cShaderStorageBufferObjectTests.hpp"
51 #include "gl4cShaderSubroutineTests.hpp"
52 #include "gl4cShaderTextureImageSamplesTests.hpp"
53 #include "gl4cShadingLanguage420PackTests.hpp"
54 #include "gl4cSparseBufferTests.hpp"
55 #include "gl4cSparseTexture2Tests.hpp"
56 #include "gl4cSparseTextureClampTests.hpp"
57 #include "gl4cSparseTextureTests.hpp"
58 #include "gl4cStencilTexturingTests.hpp"
59 #include "gl4cSyncTests.hpp"
60 #include "gl4cTextureBarrierTests.hpp"
61 #include "gl4cTextureFilterMinmaxTests.hpp"
62 #include "gl4cTextureGatherTests.hpp"
63 #include "gl4cTextureViewTests.hpp"
64 #include "gl4cVertexAttrib64BitTest.hpp"
65 #include "gl4cVertexAttribBindingTests.hpp"
66 #include "glcBlendEquationAdvancedTests.hpp"
67 #include "glcInfoTests.hpp"
68 #include "glcRobustBufferAccessBehaviorTests.hpp"
69 #include "glcSampleVariablesTests.hpp"
70 #include "glcShaderLibrary.hpp"
71 #include "glcShaderMultisampleInterpolationTests.hpp"
72 #include "glcViewportArrayTests.hpp"
73
74 #include "../gles31/es31cArrayOfArraysTests.hpp"
75 #include "../gles31/es31cDrawIndirectTests.hpp"
76 #include "../gles31/es31cExplicitUniformLocationTest.hpp"
77 #include "../gles31/es31cLayoutBindingTests.hpp"
78 #include "../gles31/es31cSampleShadingTests.hpp"
79 #include "../gles31/es31cSeparateShaderObjsTests.hpp"
80 #include "../gles31/es31cShaderBitfieldOperationTests.hpp"
81 #include "../glesext/draw_elements_base_vertex/esextcDrawElementsBaseVertexTests.hpp"
82 #include "../glesext/geometry_shader/esextcGeometryShaderTests.hpp"
83 #include "../glesext/gpu_shader5/esextcGPUShader5Tests.hpp"
84 #include "../glesext/tessellation_shader/esextcTessellationShaderTests.hpp"
85 #include "../glesext/texture_border_clamp/esextcTextureBorderClampTests.hpp"
86 #include "../glesext/texture_buffer/esextcTextureBufferTests.hpp"
87 #include "../glesext/texture_cube_map_array/esextcTextureCubeMapArrayTests.hpp"
88
89 namespace gl4cts
90 {
91
92 // GL40TestPackage
93
94 GL40TestPackage::GL40TestPackage(tcu::TestContext& testCtx, const char* packageName, const char* description,
95                                                                  glu::ContextType renderContextType)
96         : GL33TestPackage(testCtx, packageName, packageName, renderContextType)
97 {
98         (void)description;
99 }
100
101 GL40TestPackage::~GL40TestPackage(void)
102 {
103 }
104
105 void GL40TestPackage::init(void)
106 {
107         // Call init() in parent - this creates context.
108         GL33TestPackage::init();
109
110         try
111         {
112                 glcts::ExtParameters extParams(glu::GLSL_VERSION_400, glcts::EXTENSIONTYPE_NONE);
113                 addChild(new glcts::DrawElementsBaseVertexTests(getContext(), extParams));
114                 addChild(new gl4cts::GPUShaderFP64Tests(getContext()));
115                 addChild(new gl4cts::TextureGatherTests(getContext()));
116                 addChild(new glcts::DrawIndirectTestsGL40(getContext()));
117                 addChild(new gl4cts::ClipControlTests(getContext(), gl4cts::ClipControlTests::API_GL_ARB_clip_control));
118                 addChild(new gl4cts::ShaderSubroutineTests(getContext()));
119                 addChild(
120                         new gl4cts::TextureBarrierTests(getContext(), gl4cts::TextureBarrierTests::API_GL_ARB_texture_barrier));
121         }
122         catch (...)
123         {
124                 // Destroy context.
125                 TestPackage::deinit();
126                 throw;
127         }
128 }
129
130 // GL41TestPackage
131
132 GL41TestPackage::GL41TestPackage(tcu::TestContext& testCtx, const char* packageName, const char* description,
133                                                                  glu::ContextType renderContextType)
134         : GL40TestPackage(testCtx, packageName, packageName, renderContextType)
135 {
136         (void)description;
137 }
138
139 GL41TestPackage::~GL41TestPackage(void)
140 {
141 }
142
143 void GL41TestPackage::init(void)
144 {
145         // Call init() in parent - this creates context.
146         GL40TestPackage::init();
147
148         try
149         {
150                 addChild(new gl4cts::VertexAttrib64BitTests(getContext()));
151                 glcts::ExtParameters extParams(glu::GLSL_VERSION_410, glcts::EXTENSIONTYPE_NONE);
152                 addChild(new glcts::ViewportArrayTests(getContext(), extParams));
153         }
154         catch (...)
155         {
156                 // Destroy context.
157                 TestPackage::deinit();
158                 throw;
159         }
160 }
161
162 // GL42TestPackage
163
164 GL42TestPackage::GL42TestPackage(tcu::TestContext& testCtx, const char* packageName, const char* description,
165                                                                  glu::ContextType renderContextType)
166         : GL41TestPackage(testCtx, packageName, packageName, renderContextType)
167 {
168         (void)description;
169 }
170
171 GL42TestPackage::~GL42TestPackage(void)
172 {
173 }
174
175 void GL42TestPackage::init(void)
176 {
177         // Call init() in parent - this creates context.
178         GL41TestPackage::init();
179
180         try
181         {
182                 addChild(new gl4cts::MapBufferAlignmentTests(getContext()));
183                 addChild(new gl4cts::ShaderAtomicCountersTests(getContext()));
184                 addChild(new gl4cts::ShaderImageLoadStoreTests(getContext()));
185                 addChild(new gl4cts::ShadingLanguage420PackTests(getContext()));
186                 addChild(new gl4cts::TextureViewTests(getContext()));
187         }
188         catch (...)
189         {
190                 // Destroy context.
191                 TestPackage::deinit();
192                 throw;
193         }
194 }
195
196 // GL43TestPackage
197
198 GL43TestPackage::GL43TestPackage(tcu::TestContext& testCtx, const char* packageName, const char* description,
199                                                                  glu::ContextType renderContextType)
200         : GL42TestPackage(testCtx, packageName, packageName, renderContextType)
201 {
202         (void)description;
203 }
204
205 GL43TestPackage::~GL43TestPackage(void)
206 {
207 }
208
209 void GL43TestPackage::init(void)
210 {
211         // Call init() in parent - this creates context.
212         GL42TestPackage::init();
213
214         try
215         {
216                 addChild(new glcts::ArrayOfArraysTestGroupGL(getContext()));
217                 addChild(new gl4cts::CopyImageTests(getContext()));
218                 addChild(new glcts::DrawIndirectTestsGL43(getContext()));
219                 addChild(new gl4cts::KHRDebugTests(getContext()));
220                 addChild(new gl4cts::ProgramInterfaceQueryTests(getContext()));
221                 addChild(new gl4cts::ComputeShaderTests(getContext()));
222                 addChild(new deqp::RobustBufferAccessBehaviorTests(getContext()));
223                 addChild(new gl4cts::ShaderStorageBufferObjectTests(getContext()));
224                 addChild(new gl4cts::VertexAttribBindingTests(getContext()));
225                 addChild(new gl4cts::ShaderImageSizeTests(getContext()));
226                 addChild(new glcts::ExplicitUniformLocationGLTests(getContext()));
227                 addChild(new glcts::BlendEquationAdvancedTests(getContext(), glu::GLSL_VERSION_430));
228                 addChild(new glcts::ShaderBitfieldOperationTests(getContext(), glu::GLSL_VERSION_430));
229                 addChild(new gl4cts::StencilTexturingTests(getContext()));
230                 addChild(new gl4cts::SparseBufferTests(getContext()));
231                 addChild(new gl4cts::SparseTextureTests(getContext()));
232                 addChild(new gl4cts::IndirectParametersTests(getContext()));
233         }
234         catch (...)
235         {
236                 // Destroy context.
237                 TestPackage::deinit();
238                 throw;
239         }
240 }
241
242 // GL44TestPackage
243
244 class GL44ShaderTests : public deqp::TestCaseGroup
245 {
246 public:
247         GL44ShaderTests(deqp::Context& context) : TestCaseGroup(context, "shaders44", "Shading Language Tests")
248         {
249         }
250
251         void init(void)
252         {
253                 addChild(
254                         new deqp::ShaderLibraryGroup(m_context, "preprocessor", "Preprocessor Tests", "gl44/preprocessor.test"));
255         }
256 };
257
258 GL44TestPackage::GL44TestPackage(tcu::TestContext& testCtx, const char* packageName, const char* description,
259                                                                  glu::ContextType renderContextType)
260         : GL43TestPackage(testCtx, packageName, packageName, renderContextType)
261 {
262         (void)description;
263 }
264
265 GL44TestPackage::~GL44TestPackage(void)
266 {
267 }
268
269 void GL44TestPackage::init(void)
270 {
271         // Call init() in parent - this creates context.
272         GL43TestPackage::init();
273
274         try
275         {
276                 addChild(new GL44ShaderTests(getContext()));
277                 addChild(new gl4cts::BufferStorageTests(getContext()));
278                 addChild(new gl4cts::EnhancedLayoutsTests(getContext()));
279                 addChild(new glcts::LayoutBindingTests(getContext(), glu::GLSL_VERSION_440));
280                 addChild(new gl4cts::MultiBindTests(getContext()));
281                 addChild(new glcts::SeparateShaderObjsTests(getContext(), glu::GLSL_VERSION_440));
282                 addChild(new glcts::SampleShadingTests(getContext(), glu::GLSL_VERSION_440));
283                 addChild(new deqp::SampleVariablesTests(getContext(), glu::GLSL_VERSION_440));
284                 addChild(new deqp::ShaderMultisampleInterpolationTests(getContext(), glu::GLSL_VERSION_440));
285                 addChild(new glcts::ShaderTextureImageSamplesTests(getContext()));
286
287                 glcts::ExtParameters extParams(glu::GLSL_VERSION_440, glcts::EXTENSIONTYPE_NONE);
288                 addChild(new glcts::GeometryShaderTests(getContext(), extParams));
289                 addChild(new glcts::GPUShader5Tests(getContext(), extParams));
290                 addChild(new glcts::TessellationShaderTests(getContext(), extParams));
291                 addChild(new glcts::TextureCubeMapArrayTests(getContext(), extParams));
292                 addChild(new glcts::TextureBorderClampTests(getContext(), extParams));
293                 addChild(new glcts::TextureBufferTests(getContext(), extParams));
294
295                 //addChild(new gl4cts::ContextFlushControl::Tests(getContext()));
296         }
297         catch (...)
298         {
299                 // Destroy context.
300                 TestPackage::deinit();
301                 throw;
302         }
303 }
304
305 // GL45TestPackage
306
307 GL45TestPackage::GL45TestPackage(tcu::TestContext& testCtx, const char* packageName, const char* description,
308                                                                  glu::ContextType renderContextType)
309         : GL44TestPackage(testCtx, packageName, packageName, renderContextType)
310 {
311         (void)description;
312 }
313
314 GL45TestPackage::~GL45TestPackage(void)
315 {
316 }
317
318 void GL45TestPackage::init(void)
319 {
320         // Call init() in parent - this creates context.
321         GL44TestPackage::init();
322
323         try
324         {
325                 addChild(new gl4cts::ClipControlTests(getContext(), gl4cts::ClipControlTests::API_GL_45core));
326                 addChild(new gl4cts::DirectStateAccess::Tests(getContext()));
327                 addChild(new gl4cts::GetTextureSubImage::Tests(getContext()));
328                 addChild(new gl4cts::RobustnessTests(getContext()));
329                 addChild(new gl4cts::TextureBarrierTests(getContext(), gl4cts::TextureBarrierTests::API_GL_45core));
330                 addChild(new gl4cts::ConditionalRenderInverted::Tests(getContext()));
331                 addChild(new gl4cts::Sync::Tests(getContext()));
332                 addChild(new gl4cts::IncompleteTextureAccess::Tests(getContext()));
333                 addChild(new gl4cts::ParallelShaderCompileTests(getContext()));
334                 addChild(new gl4cts::PostDepthCoverage(getContext()));
335                 addChild(new gl4cts::SparseTexture2Tests(getContext()));
336                 addChild(new gl4cts::SparseTextureClampTests(getContext()));
337                 addChild(new gl4cts::TextureFilterMinmax(getContext()));
338         }
339         catch (...)
340         {
341                 // Destroy context.
342                 TestPackage::deinit();
343                 throw;
344         }
345 }
346
347 } // gl4cts