Home | History | Annotate | Download | only in functional
      1 /*-------------------------------------------------------------------------
      2  * drawElements Quality Program OpenGL ES 2.0 Module
      3  * -------------------------------------------------
      4  *
      5  * Copyright 2014 The Android Open Source Project
      6  *
      7  * Licensed under the Apache License, Version 2.0 (the "License");
      8  * you may not use this file except in compliance with the License.
      9  * You may obtain a copy of the License at
     10  *
     11  *      http://www.apache.org/licenses/LICENSE-2.0
     12  *
     13  * Unless required by applicable law or agreed to in writing, software
     14  * distributed under the License is distributed on an "AS IS" BASIS,
     15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     16  * See the License for the specific language governing permissions and
     17  * limitations under the License.
     18  *
     19  *//*!
     20  * \file
     21  * \brief Base class for a test case.
     22  *//*--------------------------------------------------------------------*/
     23 
     24 #include "es2fFunctionalTests.hpp"
     25 
     26 #include "es2fColorClearTest.hpp"
     27 #include "es2fLightAmountTest.hpp"
     28 #include "es2fShaderExecuteTest.hpp"
     29 #include "es2fFboApiTest.hpp"
     30 #include "es2fFboRenderTest.hpp"
     31 #include "es2fFboCompletenessTests.hpp"
     32 #include "es2fRandomShaderTests.hpp"
     33 #include "es2fPrerequisiteTests.hpp"
     34 #include "es2fDepthTests.hpp"
     35 #include "es2fStencilTests.hpp"
     36 #include "es2fScissorTests.hpp"
     37 #include "es2fVertexArrayTest.hpp"
     38 #include "es2fRasterizationTests.hpp"
     39 #include "es2fDepthStencilClearTests.hpp"
     40 #include "es2fDepthStencilTests.hpp"
     41 #include "es2fBlendTests.hpp"
     42 #include "es2fRandomFragmentOpTests.hpp"
     43 #include "es2fMultisampleTests.hpp"
     44 #include "es2fUniformApiTests.hpp"
     45 #include "es2fBufferWriteTests.hpp"
     46 #include "es2fImplementationLimitTests.hpp"
     47 #include "es2fDepthRangeTests.hpp"
     48 #include "es2fDitheringTests.hpp"
     49 #include "es2fClippingTests.hpp"
     50 #include "es2fPolygonOffsetTests.hpp"
     51 #include "es2fDrawTests.hpp"
     52 #include "es2fFragOpInteractionTests.hpp"
     53 #include "es2fFlushFinishTests.hpp"
     54 #include "es2fDefaultVertexAttributeTests.hpp"
     55 #include "es2fLifetimeTests.hpp"
     56 
     57 #include "es2fTextureFormatTests.hpp"
     58 #include "es2fTextureWrapTests.hpp"
     59 #include "es2fTextureFilteringTests.hpp"
     60 #include "es2fTextureMipmapTests.hpp"
     61 #include "es2fTextureSizeTests.hpp"
     62 #include "es2fTextureSpecificationTests.hpp"
     63 #include "es2fTextureCompletenessTests.hpp"
     64 #include "es2fNegativeVertexArrayApiTests.hpp"
     65 #include "es2fNegativeTextureApiTests.hpp"
     66 #include "es2fNegativeFragmentApiTests.hpp"
     67 #include "es2fNegativeBufferApiTests.hpp"
     68 #include "es2fNegativeShaderApiTests.hpp"
     69 #include "es2fNegativeStateApiTests.hpp"
     70 #include "es2fVertexTextureTests.hpp"
     71 #include "es2fTextureUnitTests.hpp"
     72 
     73 #include "es2fShaderApiTests.hpp"
     74 #include "es2fShaderAlgorithmTests.hpp"
     75 #include "es2fShaderBuiltinVarTests.hpp"
     76 #include "es2fShaderConstExprTests.hpp"
     77 #include "es2fShaderDiscardTests.hpp"
     78 #include "es2fShaderIndexingTests.hpp"
     79 #include "es2fShaderLoopTests.hpp"
     80 #include "es2fShaderOperatorTests.hpp"
     81 #include "es2fShaderReturnTests.hpp"
     82 #include "es2fShaderStructTests.hpp"
     83 #include "es2fShaderMatrixTests.hpp"
     84 #include "es2fShaderTextureFunctionTests.hpp"
     85 #include "es2fAttribLocationTests.hpp"
     86 #include "es2fShaderInvarianceTests.hpp"
     87 #include "es2fShaderFragDataTests.hpp"
     88 
     89 // State query tests
     90 #include "es2fBooleanStateQueryTests.hpp"
     91 #include "es2fIntegerStateQueryTests.hpp"
     92 #include "es2fFloatStateQueryTests.hpp"
     93 #include "es2fTextureStateQueryTests.hpp"
     94 #include "es2fStringQueryTests.hpp"
     95 #include "es2fBufferObjectQueryTests.hpp"
     96 #include "es2fFboStateQueryTests.hpp"
     97 #include "es2fRboStateQueryTests.hpp"
     98 #include "es2fShaderStateQueryTests.hpp"
     99 
    100 #include "es2fReadPixelsTests.hpp"
    101 
    102 namespace deqp
    103 {
    104 namespace gles2
    105 {
    106 namespace Functional
    107 {
    108 
    109 // ShadersTestGroup
    110 
    111 class ShadersTestGroup : public TestCaseGroup
    112 {
    113 public:
    114 	ShadersTestGroup (Context& context)
    115 		: TestCaseGroup(context, "shaders", "Shader Tests")
    116 	{
    117 	}
    118 
    119 	virtual ~ShadersTestGroup (void)
    120 	{
    121 	}
    122 
    123 	virtual void init (void)
    124 	{
    125 		addChild(new ShaderExecuteTest(m_context, "preprocessor",			"Preprocessor Tests"));
    126 		addChild(new ShaderExecuteTest(m_context, "constants",				"Constant Literal Tests"));
    127 		addChild(new ShaderExecuteTest(m_context, "linkage",				"Linkage Tests"));
    128 		addChild(new ShaderExecuteTest(m_context, "conversions",			"Type Conversion Tests"));
    129 		addChild(new ShaderExecuteTest(m_context, "conditionals",			"Conditionals Tests"));
    130 		addChild(new ShaderExecuteTest(m_context, "declarations",			"Declarations Tests"));
    131 		addChild(new ShaderExecuteTest(m_context, "swizzles",				"Swizzle Tests"));
    132 		addChild(new ShaderExecuteTest(m_context, "functions",				"Function Tests"));
    133 		addChild(new ShaderExecuteTest(m_context, "keywords",				"Keyword Tests"));
    134 		addChild(new ShaderExecuteTest(m_context, "reserved_operators",		"Reserved Operator Tests"));
    135 		addChild(new ShaderExecuteTest(m_context, "qualification_order",	"Order of Qualification Tests"));
    136 		addChild(new ShaderExecuteTest(m_context, "scoping",				"Scoping of Declarations"));
    137 
    138 		addChild(new ShaderIndexingTests		(m_context));
    139 		addChild(new ShaderLoopTests			(m_context));
    140 		addChild(new ShaderOperatorTests		(m_context));
    141 		addChild(new ShaderMatrixTests			(m_context));
    142 		addChild(new ShaderReturnTests			(m_context));
    143 		addChild(new ShaderDiscardTests			(m_context));
    144 		addChild(new ShaderStructTests			(m_context));
    145 		addChild(new ShaderBuiltinVarTests		(m_context));
    146 		addChild(new ShaderTextureFunctionTests	(m_context));
    147 		addChild(new ShaderInvarianceTests		(m_context));
    148 		addChild(new ShaderFragDataTests		(m_context));
    149 		addChild(new ShaderAlgorithmTests		(m_context));
    150 		addChild(new ShaderConstExprTests		(m_context));
    151 
    152 		addChild(new RandomShaderTests(m_context));
    153 	}
    154 };
    155 
    156 // TextureTestGroup
    157 
    158 class TextureTestGroup : public TestCaseGroup
    159 {
    160 public:
    161 	TextureTestGroup (Context& context)
    162 		: TestCaseGroup(context, "texture", "Texture Tests")
    163 	{
    164 	}
    165 
    166 	virtual ~TextureTestGroup (void)
    167 	{
    168 	}
    169 
    170 	virtual void init (void)
    171 	{
    172 		addChild(new TextureFormatTests			(m_context));
    173 		addChild(new TextureSizeTests			(m_context));
    174 		addChild(new TextureWrapTests			(m_context));
    175 		addChild(new TextureFilteringTests		(m_context));
    176 		addChild(new TextureMipmapTests			(m_context));
    177 		addChild(new TextureSpecificationTests	(m_context));
    178 		addChild(new TextureCompletenessTests	(m_context));
    179 		addChild(new VertexTextureTests			(m_context));
    180 		addChild(new TextureUnitTests			(m_context));
    181 	}
    182 
    183 	virtual void deinit (void)
    184 	{
    185 	}
    186 };
    187 
    188 class BufferTests : public TestCaseGroup
    189 {
    190 public:
    191 	BufferTests (Context& context)
    192 		: TestCaseGroup(context, "buffer", "Buffer object tests")
    193 	{
    194 	}
    195 
    196 	void init (void)
    197 	{
    198 		addChild(new BufferWriteTests(m_context));
    199 	}
    200 };
    201 
    202 // FboTestGroup
    203 
    204 class FboTestGroup : public TestCaseGroup
    205 {
    206 public:
    207 	FboTestGroup (Context& context)
    208 		: TestCaseGroup(context, "fbo", "Framebuffer Object Tests")
    209 	{
    210 	}
    211 
    212 	virtual ~FboTestGroup (void)
    213 	{
    214 	}
    215 
    216 	virtual void init (void)
    217 	{
    218 		addChild(new FboApiTestGroup(m_context));
    219 		addChild(new FboRenderTestGroup(m_context));
    220 		addChild(createFboCompletenessTests(m_context));
    221 	}
    222 };
    223 
    224 // NegativeApiTestGroup
    225 
    226 class NegativeApiTestGroup : public TestCaseGroup
    227 {
    228 public:
    229 	NegativeApiTestGroup (Context& context)
    230 		: TestCaseGroup(context, "negative_api", "Negative API Tests")
    231 	{
    232 	}
    233 
    234 	virtual ~NegativeApiTestGroup (void)
    235 	{
    236 	}
    237 
    238 	virtual void init (void)
    239 	{
    240 		addChild(new NegativeBufferApiTests			(m_context));
    241 		addChild(new NegativeFragmentApiTests		(m_context));
    242 		addChild(new NegativeShaderApiTests			(m_context));
    243 		addChild(new NegativeStateApiTests			(m_context));
    244 		addChild(new NegativeTextureApiTests		(m_context));
    245 		addChild(new NegativeVertexArrayApiTests	(m_context));
    246 	}
    247 };
    248 
    249 // FragmentOpTests
    250 
    251 class FragmentOpTests : public TestCaseGroup
    252 {
    253 public:
    254 	FragmentOpTests (Context& context)
    255 		: TestCaseGroup(context, "fragment_ops", "Per-Fragment Operation Tests")
    256 	{
    257 	}
    258 
    259 	void init (void)
    260 	{
    261 		addChild(new DepthTests				(m_context));
    262 		addChild(new StencilTests			(m_context));
    263 		addChild(new DepthStencilTests		(m_context));
    264 		addChild(new ScissorTests			(m_context));
    265 		addChild(new BlendTests				(m_context));
    266 		addChild(new RandomFragmentOpTests	(m_context));
    267 		addChild(new FragOpInteractionTests	(m_context));
    268 	}
    269 };
    270 
    271 // StateQueryTests
    272 
    273 class StateQueryTests : public TestCaseGroup
    274 {
    275 public:
    276 	StateQueryTests (Context& context)
    277 		: TestCaseGroup(context, "state_query", "State Query Tests")
    278 	{
    279 	}
    280 
    281 	void init (void)
    282 	{
    283 		addChild(new BooleanStateQueryTests		(m_context));
    284 		addChild(new IntegerStateQueryTests		(m_context));
    285 		addChild(new FloatStateQueryTests		(m_context));
    286 		addChild(new TextureStateQueryTests		(m_context));
    287 		addChild(new StringQueryTests			(m_context));
    288 		addChild(new BufferObjectQueryTests		(m_context));
    289 		addChild(new FboStateQueryTests			(m_context));
    290 		addChild(new RboStateQueryTests			(m_context));
    291 		addChild(new ShaderStateQueryTests		(m_context));
    292 	}
    293 };
    294 
    295 // FunctionalTestGroup
    296 
    297 FunctionalTests::FunctionalTests (Context& context)
    298 	: TestCaseGroup(context, "functional", "Functionality Tests")
    299 {
    300 }
    301 
    302 FunctionalTests::~FunctionalTests (void)
    303 {
    304 }
    305 
    306 void FunctionalTests::init (void)
    307 {
    308 	addChild(new PrerequisiteTests			(m_context));
    309 	addChild(new ImplementationLimitTests	(m_context));
    310 	addChild(new ColorClearTest				(m_context));
    311 	addChild(new DepthStencilClearTests		(m_context));
    312 	addChild(new BufferTests				(m_context));
    313 	addChild(new LightAmountTest			(m_context));
    314 	addChild(new ShadersTestGroup			(m_context));
    315 	addChild(new TextureTestGroup			(m_context));
    316 	addChild(new FragmentOpTests			(m_context));
    317 	addChild(new FboTestGroup				(m_context));
    318 	addChild(new VertexArrayTestGroup		(m_context));
    319 	addChild(new ShaderApiTests				(m_context));
    320 	addChild(new NegativeApiTestGroup		(m_context));
    321 	addChild(new RasterizationTests			(m_context));
    322 	addChild(createAttributeLocationTests	(m_context));
    323 	addChild(new MultisampleTests			(m_context));
    324 	addChild(new UniformApiTests			(m_context));
    325 	addChild(new ReadPixelsTests			(m_context));
    326 	addChild(new DepthRangeTests			(m_context));
    327 	addChild(new DitheringTests				(m_context));
    328 	addChild(new StateQueryTests			(m_context));
    329 	addChild(new ClippingTests				(m_context));
    330 	addChild(new PolygonOffsetTests			(m_context));
    331 	addChild(new DrawTests					(m_context));
    332 	addChild(new FlushFinishTests			(m_context));
    333 	addChild(new DefaultVertexAttributeTests(m_context));
    334 	addChild(createLifetimeTests			(m_context));
    335 }
    336 
    337 } // Functional
    338 } // gles2
    339 } // deqp
    340