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