xref: /aosp_15_r20/external/deqp/external/openglcts/modules/gl/gl4cTestPackages.cpp (revision 35238bce31c2a825756842865a792f8cf7f89930)
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(
189             new deqp::ShaderLibraryGroup(m_context, "declarations", "Declaration Tests", "gl42/declarations.test"));
190     }
191 };
192 
GL42TestPackage(tcu::TestContext & testCtx,const char * packageName,const char * description,glu::ContextType renderContextType)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 
~GL42TestPackage(void)200 GL42TestPackage::~GL42TestPackage(void)
201 {
202 }
203 
init(void)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 // GL42CompatTestPackage
227 
228 class GL42CompatShaderTests : public deqp::TestCaseGroup
229 {
230 public:
GL42CompatShaderTests(deqp::Context & context)231     GL42CompatShaderTests(deqp::Context &context) : TestCaseGroup(context, "shaders42", "Shading Language Tests")
232     {
233     }
234 
init(void)235     void init(void)
236     {
237         addChild(new deqp::ShaderLibraryGroup(m_context, "builtin", "Builtin Tests", "gl42-compat/builtins.test"));
238         addChild(new deqp::ShaderLibraryGroup(m_context, "varying", "Varying Tests", "gl42-compat/varyings.test"));
239     }
240 };
241 
GL42CompatTestPackage(tcu::TestContext & testCtx,const char * packageName,const char * description,glu::ContextType renderContextType)242 GL42CompatTestPackage::GL42CompatTestPackage(tcu::TestContext &testCtx, const char *packageName,
243                                              const char *description, glu::ContextType renderContextType)
244     : TestPackage(testCtx, packageName, packageName, renderContextType, "gl_cts/data/")
245 {
246     (void)description;
247 }
248 
~GL42CompatTestPackage(void)249 GL42CompatTestPackage::~GL42CompatTestPackage(void)
250 {
251 }
252 
init(void)253 void GL42CompatTestPackage::init(void)
254 {
255     // Call init() in parent - this creates context.
256     TestPackage::init();
257 
258     try
259     {
260         addChild(new GL42CompatShaderTests(getContext()));
261     }
262     catch (...)
263     {
264         // Destroy context.
265         TestPackage::deinit();
266         throw;
267     }
268 }
269 
createExecutor(void) const270 tcu::TestCaseExecutor *GL42CompatTestPackage::createExecutor(void) const
271 {
272     return new gl3cts::TestCaseWrapper(const_cast<GL42CompatTestPackage &>(*this), m_waiverMechanism);
273 }
274 
275 // GL43TestPackage
276 
GL43TestPackage(tcu::TestContext & testCtx,const char * packageName,const char * description,glu::ContextType renderContextType)277 GL43TestPackage::GL43TestPackage(tcu::TestContext &testCtx, const char *packageName, const char *description,
278                                  glu::ContextType renderContextType)
279     : GL42TestPackage(testCtx, packageName, packageName, renderContextType)
280 {
281     (void)description;
282 }
283 
~GL43TestPackage(void)284 GL43TestPackage::~GL43TestPackage(void)
285 {
286 }
287 
init(void)288 void GL43TestPackage::init(void)
289 {
290     // Call init() in parent - this creates context.
291     GL42TestPackage::init();
292 
293     try
294     {
295         addChild(new gl4cts::CopyImageTests(getContext()));
296         addChild(new glcts::DrawIndirectTestsGL43(getContext()));
297         addChild(new gl4cts::ProgramInterfaceQueryTests(getContext()));
298         addChild(new gl4cts::ComputeShaderTests(getContext()));
299         addChild(new gl4cts::ShaderStorageBufferObjectTests(getContext()));
300         addChild(new gl4cts::VertexAttribBindingTests(getContext()));
301         addChild(new gl4cts::ShaderImageSizeTests(getContext()));
302         addChild(new glcts::ExplicitUniformLocationGLTests(getContext()));
303         addChild(new glcts::BlendEquationAdvancedTests(getContext(), glu::GLSL_VERSION_430));
304         addChild(new glcts::ShaderBitfieldOperationTests(getContext(), glu::GLSL_VERSION_430));
305         addChild(new gl4cts::StencilTexturingTests(getContext()));
306         addChild(new gl4cts::SparseBufferTests(getContext()));
307         addChild(new gl4cts::SparseTextureTests(getContext()));
308         addChild(new gl4cts::IndirectParametersTests(getContext()));
309         addChild(new gl4cts::ShaderBallotTests(getContext()));
310         addChild(new glcts::ShaderConstExprTests(getContext()));
311         addChild(new glcts::AggressiveShaderOptimizationsTests(getContext()));
312     }
313     catch (...)
314     {
315         // Destroy context.
316         TestPackage::deinit();
317         throw;
318     }
319 }
320 
321 // GL44TestPackage
322 
323 class GL44ShaderTests : public deqp::TestCaseGroup
324 {
325 public:
GL44ShaderTests(deqp::Context & context)326     GL44ShaderTests(deqp::Context &context) : TestCaseGroup(context, "shaders44", "Shading Language Tests")
327     {
328     }
329 
init(void)330     void init(void)
331     {
332         addChild(
333             new deqp::ShaderLibraryGroup(m_context, "preprocessor", "Preprocessor Tests", "gl44/preprocessor.test"));
334     }
335 };
336 
GL44TestPackage(tcu::TestContext & testCtx,const char * packageName,const char * description,glu::ContextType renderContextType)337 GL44TestPackage::GL44TestPackage(tcu::TestContext &testCtx, const char *packageName, const char *description,
338                                  glu::ContextType renderContextType)
339     : GL43TestPackage(testCtx, packageName, packageName, renderContextType)
340 {
341     (void)description;
342 }
343 
~GL44TestPackage(void)344 GL44TestPackage::~GL44TestPackage(void)
345 {
346 }
347 
init(void)348 void GL44TestPackage::init(void)
349 {
350     // Call init() in parent - this creates context.
351     GL43TestPackage::init();
352 
353     try
354     {
355         addChild(new GL44ShaderTests(getContext()));
356         addChild(new gl4cts::BufferStorageTests(getContext()));
357         addChild(new glcts::LayoutBindingTests(getContext(), glu::GLSL_VERSION_440));
358         addChild(new gl4cts::MultiBindTests(getContext()));
359         addChild(new glcts::SeparateShaderObjsTests(getContext(), glu::GLSL_VERSION_440));
360         addChild(new glcts::SampleShadingTests(getContext(), glu::GLSL_VERSION_440));
361         addChild(new deqp::SampleVariablesTests(getContext(), glu::GLSL_VERSION_440));
362         addChild(new deqp::ShaderMultisampleInterpolationTests(getContext(), glu::GLSL_VERSION_440));
363         addChild(new glcts::ShaderTextureImageSamplesTests(getContext()));
364         addChild(new glcts::TextureFilterAnisotropicTests(getContext()));
365 
366         glcts::ExtParameters extParams(glu::GLSL_VERSION_440, glcts::EXTENSIONTYPE_NONE);
367         addChild(new glcts::GeometryShaderTests(getContext(), extParams));
368         addChild(new glcts::GPUShader5Tests(getContext(), extParams));
369         addChild(new glcts::TessellationShaderTests(getContext(), extParams));
370         addChild(new glcts::TextureCubeMapArrayTests(getContext(), extParams));
371         addChild(new glcts::TextureBorderClampTests(getContext(), extParams));
372         addChild(new glcts::TextureBufferTests(getContext(), extParams));
373 
374         //addChild(new gl4cts::ContextFlushControl::Tests(getContext()));
375     }
376     catch (...)
377     {
378         // Destroy context.
379         TestPackage::deinit();
380         throw;
381     }
382 }
383 
384 // GL45TestPackage
385 
386 class GL45ShaderTests : public deqp::TestCaseGroup
387 {
388 public:
GL45ShaderTests(deqp::Context & context)389     GL45ShaderTests(deqp::Context &context) : TestCaseGroup(context, "shaders45", "Shading Language Tests")
390     {
391     }
392 
init(void)393     void init(void)
394     {
395         addChild(new deqp::ShaderIntegerMixTests(getContext(), glu::GLSL_VERSION_450));
396     }
397 };
398 
GL45TestPackage(tcu::TestContext & testCtx,const char * packageName,const char * description,glu::ContextType renderContextType)399 GL45TestPackage::GL45TestPackage(tcu::TestContext &testCtx, const char *packageName, const char *description,
400                                  glu::ContextType renderContextType)
401     : GL44TestPackage(testCtx, packageName, packageName, renderContextType)
402 {
403     (void)description;
404 }
405 
~GL45TestPackage(void)406 GL45TestPackage::~GL45TestPackage(void)
407 {
408 }
409 
init(void)410 void GL45TestPackage::init(void)
411 {
412     // Call init() in parent - this creates context.
413     GL44TestPackage::init();
414 
415     try
416     {
417         addChild(new GL45ShaderTests(getContext()));
418         addChild(new gl4cts::ClipControlTests(getContext(), gl4cts::ClipControlTests::API_GL_45core));
419         addChild(new gl4cts::DirectStateAccess::Tests(getContext()));
420         addChild(new gl4cts::GetTextureSubImage::Tests(getContext()));
421         addChild(new gl4cts::TextureBarrierTests(getContext(), gl4cts::TextureBarrierTests::API_GL_45core));
422         addChild(new gl4cts::ConditionalRenderInverted::Tests(getContext()));
423         addChild(new gl4cts::Sync::Tests(getContext()));
424         addChild(new gl4cts::IncompleteTextureAccess::Tests(getContext()));
425         addChild(new glcts::ParallelShaderCompileTests(getContext()));
426         addChild(new gl4cts::PostDepthCoverage(getContext()));
427         addChild(new gl4cts::SparseTexture2Tests(getContext()));
428         addChild(new gl4cts::SparseTextureClampTests(getContext()));
429         addChild(new gl4cts::TextureFilterMinmax(getContext()));
430         addChild(new gl4cts::ShaderAtomicCounterOps(getContext()));
431         addChild(new gl4cts::ShaderDrawParametersTests(getContext()));
432         addChild(new gl4cts::ShaderViewportLayerArray(getContext()));
433         addChild(new gl4cts::LimitsTests(getContext()));
434         addChild(new glcts::ShaderGroupVote(getContext()));
435         addChild(new glcts::PolygonOffsetClamp(getContext()));
436         addChild(new glcts::SeparableProgramsTransformFeedbackTests(getContext()));
437         addChild(new glcts::LayoutLocationTests(getContext()));
438         addChild(new gl4cts::SpirvExtensionsTests(getContext()));
439         addChild(new gl4cts::GlSpirvTests(getContext()));
440     }
441     catch (...)
442     {
443         // Destroy context.
444         TestPackage::deinit();
445         throw;
446     }
447 }
448 
GL46TestPackage(tcu::TestContext & testCtx,const char * packageName,const char * description,glu::ContextType renderContextType)449 GL46TestPackage::GL46TestPackage(tcu::TestContext &testCtx, const char *packageName, const char *description,
450                                  glu::ContextType renderContextType)
451     : GL45TestPackage(testCtx, packageName, packageName, renderContextType)
452 {
453     (void)description;
454 }
455 
~GL46TestPackage(void)456 GL46TestPackage::~GL46TestPackage(void)
457 {
458 }
459 
init(void)460 void GL46TestPackage::init(void)
461 {
462     // Call init() in parent - this creates context.
463     GL45TestPackage::init();
464 }
465 
466 } // namespace gl4cts
467