es3fFunctionalTests.cpp revision 3c827367444ee418f129b2c238299f49d3264554
1/*------------------------------------------------------------------------- 2 * drawElements Quality Program OpenGL ES 3.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 Functional Test Group. 22 *//*--------------------------------------------------------------------*/ 23 24#include "es3fFunctionalTests.hpp" 25 26#include "es3fColorClearTest.hpp" 27#include "es3fDepthTests.hpp" 28#include "es3fPrerequisiteTests.hpp" 29#include "es3fStencilTests.hpp" 30#include "es3fDepthStencilTests.hpp" 31#include "es3fVertexArrayTest.hpp" 32#include "es3fUniformBlockTests.hpp" 33#include "es3fUniformApiTests.hpp" 34#include "es3fFragmentOutputTests.hpp" 35#include "es3fOcclusionQueryTests.hpp" 36#include "es3fDepthStencilClearTests.hpp" 37#include "es3fSamplerObjectTests.hpp" 38#include "es3fAttribLocationTests.hpp" 39#include "es3fPixelBufferObjectTests.hpp" 40#include "es3fRasterizationTests.hpp" 41#include "es3fRasterizerDiscardTests.hpp" 42#include "es3fTransformFeedbackTests.hpp" 43#include "es3fVertexArrayObjectTests.hpp" 44#include "es3fPrimitiveRestartTests.hpp" 45#include "es3fInstancedRenderingTests.hpp" 46#include "es3fSyncTests.hpp" 47#include "es3fBlendTests.hpp" 48#include "es3fRandomFragmentOpTests.hpp" 49#include "es3fMultisampleTests.hpp" 50#include "es3fImplementationLimitTests.hpp" 51#include "es3fDitheringTests.hpp" 52#include "es3fClippingTests.hpp" 53#include "es3fPolygonOffsetTests.hpp" 54#include "es3fDrawTests.hpp" 55#include "es3fFragOpInteractionTests.hpp" 56#include "es3fFlushFinishTests.hpp" 57#include "es3fFlushFinishTests.hpp" 58#include "es3fDefaultVertexAttributeTests.hpp" 59#include "es3fScissorTests.hpp" 60#include "es3fLifetimeTests.hpp" 61 62// Shader tests 63#include "es3fShaderApiTests.hpp" 64#include "es3fShaderConstExprTests.hpp" 65#include "es3fShaderDiscardTests.hpp" 66#include "es3fShaderIndexingTests.hpp" 67#include "es3fShaderLoopTests.hpp" 68#include "es3fShaderMatrixTests.hpp" 69#include "es3fShaderOperatorTests.hpp" 70#include "es3fShaderReturnTests.hpp" 71#include "es3fShaderStructTests.hpp" 72#include "es3fShaderSwitchTests.hpp" 73#include "es3fRandomShaderTests.hpp" 74#include "es3fFragDepthTests.hpp" 75#include "es3fShaderPrecisionTests.hpp" 76#include "es3fShaderBuiltinVarTests.hpp" 77#include "es3fShaderTextureFunctionTests.hpp" 78#include "es3fShaderDerivateTests.hpp" 79#include "es3fShaderPackingFunctionTests.hpp" 80#include "es3fShaderCommonFunctionTests.hpp" 81#include "es3fShaderInvarianceTests.hpp" 82#include "es3fShaderFragDataTests.hpp" 83#include "es3fBuiltinPrecisionTests.hpp" 84 85// Texture tests 86#include "es3fTextureFormatTests.hpp" 87#include "es3fTextureWrapTests.hpp" 88#include "es3fTextureFilteringTests.hpp" 89#include "es3fTextureMipmapTests.hpp" 90#include "es3fTextureSizeTests.hpp" 91#include "es3fTextureSwizzleTests.hpp" 92#include "es3fTextureShadowTests.hpp" 93#include "es3fTextureSpecificationTests.hpp" 94#include "es3fVertexTextureTests.hpp" 95#include "es3fTextureUnitTests.hpp" 96#include "es3fCompressedTextureTests.hpp" 97 98// Fbo tests 99#include "es3fFboApiTests.hpp" 100#include "es3fFboCompletenessTests.hpp" 101#include "es3fFboColorbufferTests.hpp" 102#include "es3fFboDepthbufferTests.hpp" 103#include "es3fFboStencilbufferTests.hpp" 104#include "es3fFramebufferBlitTests.hpp" 105#include "es3fFboMultisampleTests.hpp" 106#include "es3fFboRenderTest.hpp" 107#include "es3fFboInvalidateTests.hpp" 108 109// Buffer tests 110#include "es3fBufferWriteTests.hpp" 111#include "es3fBufferMapTests.hpp" 112#include "es3fBufferCopyTests.hpp" 113 114// Negative API tests 115#include "es3fNegativeBufferApiTests.hpp" 116#include "es3fNegativeTextureApiTests.hpp" 117#include "es3fNegativeShaderApiTests.hpp" 118#include "es3fNegativeFragmentApiTests.hpp" 119#include "es3fNegativeVertexArrayApiTests.hpp" 120#include "es3fNegativeStateApiTests.hpp" 121 122// State query tests 123#include "es3fBooleanStateQueryTests.hpp" 124#include "es3fIntegerStateQueryTests.hpp" 125#include "es3fInteger64StateQueryTests.hpp" 126#include "es3fFloatStateQueryTests.hpp" 127#include "es3fTextureStateQueryTests.hpp" 128#include "es3fStringQueryTests.hpp" 129#include "es3fSamplerStateQueryTests.hpp" 130#include "es3fBufferObjectQueryTests.hpp" 131#include "es3fFboStateQueryTests.hpp" 132#include "es3fRboStateQueryTests.hpp" 133#include "es3fShaderStateQueryTests.hpp" 134#include "es3fInternalFormatQueryTests.hpp" 135#include "es3fIndexedStateQueryTests.hpp" 136 137#include "es3fReadPixelsTests.hpp" 138 139#include "glsShaderLibrary.hpp" 140 141namespace deqp 142{ 143namespace gles3 144{ 145namespace Functional 146{ 147 148class ShaderLibraryTest : public TestCaseGroup 149{ 150public: 151 ShaderLibraryTest (Context& context, const char* name, const char* description) 152 : TestCaseGroup(context, name, description) 153 { 154 } 155 156 void init (void) 157 { 158 gls::ShaderLibrary shaderLibrary(m_testCtx, m_context.getRenderContext(), m_context.getContextInfo()); 159 std::string fileName = std::string("shaders/") + getName() + ".test"; 160 std::vector<tcu::TestNode*> children = shaderLibrary.loadShaderFile(fileName.c_str()); 161 162 for (int i = 0; i < (int)children.size(); i++) 163 addChild(children[i]); 164 } 165}; 166 167class ShaderBuiltinFunctionTests : public TestCaseGroup 168{ 169public: 170 ShaderBuiltinFunctionTests (Context& context) 171 : TestCaseGroup(context, "builtin_functions", "Built-in Function Tests") 172 { 173 } 174 175 void init (void) 176 { 177 addChild(new ShaderCommonFunctionTests (m_context)); 178 addChild(new ShaderPackingFunctionTests (m_context)); 179 addChild(createBuiltinPrecisionTests (m_context)); 180 } 181}; 182 183class ShaderTests : public TestCaseGroup 184{ 185public: 186 ShaderTests (Context& context) 187 : TestCaseGroup(context, "shaders", "Shading Language Tests") 188 { 189 } 190 191 void init (void) 192 { 193 addChild(new ShaderLibraryTest (m_context, "preprocessor", "Preprocessor Tests")); 194 addChild(new ShaderLibraryTest (m_context, "constants", "Constant Literal Tests")); 195 addChild(new ShaderLibraryTest (m_context, "linkage", "Linkage Tests")); 196 addChild(new ShaderLibraryTest (m_context, "conversions", "Type Conversion Tests")); 197 addChild(new ShaderLibraryTest (m_context, "conditionals", "Conditionals Tests")); 198 addChild(new ShaderLibraryTest (m_context, "declarations", "Declarations Tests")); 199 addChild(new ShaderLibraryTest (m_context, "swizzles", "Swizzle Tests")); 200 addChild(new ShaderLibraryTest (m_context, "functions", "Function Tests")); 201 addChild(new ShaderLibraryTest (m_context, "arrays", "Array Tests")); 202 addChild(new ShaderLibraryTest (m_context, "keywords", "Keyword Tests")); 203 addChild(new ShaderLibraryTest (m_context, "qualification_order", "Order Of Qualification Tests")); 204 addChild(new ShaderLibraryTest (m_context, "scoping", "Scoping of Declarations")); 205 addChild(new ShaderLibraryTest (m_context, "negative", "Miscellaneous Negative Shader Compilation Tests")); 206 207 addChild(new ShaderDiscardTests (m_context)); 208 addChild(new ShaderIndexingTests (m_context)); 209 addChild(new ShaderLoopTests (m_context)); 210 addChild(new ShaderOperatorTests (m_context)); 211 addChild(new ShaderMatrixTests (m_context)); 212 addChild(new ShaderReturnTests (m_context)); 213 addChild(new ShaderStructTests (m_context)); 214 addChild(new ShaderSwitchTests (m_context)); 215 addChild(new FragDepthTests (m_context)); 216 addChild(new ShaderPrecisionTests (m_context)); 217 addChild(new ShaderBuiltinVarTests (m_context)); 218 addChild(new ShaderTextureFunctionTests (m_context)); // \todo [pyry] Move to builtin? 219 addChild(new ShaderDerivateTests (m_context)); // \todo [pyry] Move to builtin? 220 addChild(new ShaderBuiltinFunctionTests (m_context)); 221 addChild(new ShaderInvarianceTests (m_context)); 222 addChild(new ShaderFragDataTests (m_context)); 223 addChild(new ShaderConstExprTests (m_context)); 224 225 addChild(new RandomShaderTests (m_context)); 226 } 227}; 228 229class TextureTests : public TestCaseGroup 230{ 231public: 232 TextureTests (Context& context) 233 : TestCaseGroup(context, "texture", "Texture Tests") 234 { 235 } 236 237 void init (void) 238 { 239 addChild(new TextureFormatTests (m_context)); 240 addChild(new TextureSizeTests (m_context)); 241 addChild(new TextureWrapTests (m_context)); 242 addChild(new TextureFilteringTests (m_context)); 243 addChild(new TextureMipmapTests (m_context)); 244 addChild(new TextureSwizzleTests (m_context)); 245 addChild(new TextureShadowTests (m_context)); 246 addChild(new TextureSpecificationTests (m_context)); 247 addChild(new VertexTextureTests (m_context)); 248 addChild(new TextureUnitTests (m_context)); 249 addChild(new CompressedTextureTests (m_context)); 250 } 251}; 252 253class FboTests : public TestCaseGroup 254{ 255public: 256 FboTests (Context& context) 257 : TestCaseGroup(context, "fbo", "Framebuffer Object Tests") 258 { 259 } 260 261 void init (void) 262 { 263 addChild(new FboApiTests (m_context)); 264 addChild(createFboCompletenessTests (m_context)); 265 addChild(new FboRenderTestGroup (m_context)); 266 addChild(new FboColorTests (m_context)); 267 addChild(new FboDepthTests (m_context)); 268 addChild(new FboStencilTests (m_context)); 269 addChild(new FramebufferBlitTests (m_context)); 270 addChild(new FboMultisampleTests (m_context)); 271 addChild(new FboInvalidateTests (m_context)); 272 } 273}; 274 275class BufferTests : public TestCaseGroup 276{ 277public: 278 BufferTests (Context& context) 279 : TestCaseGroup(context, "buffer", "Buffer object tests") 280 { 281 } 282 283 void init (void) 284 { 285 addChild(new BufferWriteTests (m_context)); 286 addChild(new BufferMapTests (m_context)); 287 addChild(new BufferCopyTests (m_context)); 288 } 289}; 290 291class NegativeApiTestGroup : public TestCaseGroup 292{ 293public: 294 NegativeApiTestGroup (Context& context) 295 : TestCaseGroup(context, "negative_api", "Negative API Tests") 296 { 297 } 298 299 virtual ~NegativeApiTestGroup (void) 300 { 301 } 302 303 virtual void init (void) 304 { 305 addChild(new NegativeBufferApiTests (m_context)); 306 addChild(new NegativeTextureApiTests (m_context)); 307 addChild(new NegativeShaderApiTests (m_context)); 308 addChild(new NegativeFragmentApiTests (m_context)); 309 addChild(new NegativeVertexArrayApiTests (m_context)); 310 addChild(new NegativeStateApiTests (m_context)); 311 } 312}; 313 314class FragmentOpTests : public TestCaseGroup 315{ 316public: 317 FragmentOpTests (Context& context) 318 : TestCaseGroup(context, "fragment_ops", "Per-Fragment Operation Tests") 319 { 320 } 321 322 void init (void) 323 { 324 addChild(new DepthTests (m_context)); 325 addChild(new StencilTests (m_context)); 326 addChild(new DepthStencilTests (m_context)); 327 addChild(new BlendTests (m_context)); 328 addChild(new RandomFragmentOpTests (m_context)); 329 addChild(new FragOpInteractionTests (m_context)); 330 addChild(new ScissorTests (m_context)); 331 } 332}; 333 334class StateQueryTests : public TestCaseGroup 335{ 336public: 337 StateQueryTests (Context& context) 338 : TestCaseGroup(context, "state_query", "State Query Tests") 339 { 340 } 341 342 void init (void) 343 { 344 addChild(new BooleanStateQueryTests (m_context)); 345 addChild(new IntegerStateQueryTests (m_context)); 346 addChild(new Integer64StateQueryTests (m_context)); 347 addChild(new FloatStateQueryTests (m_context)); 348 addChild(new IndexedStateQueryTests (m_context)); 349 addChild(new TextureStateQueryTests (m_context)); 350 addChild(new StringQueryTests (m_context)); 351 addChild(new SamplerStateQueryTests (m_context)); 352 addChild(new BufferObjectQueryTests (m_context)); 353 addChild(new FboStateQueryTests (m_context)); 354 addChild(new RboStateQueryTests (m_context)); 355 addChild(new ShaderStateQueryTests (m_context)); 356 addChild(new InternalFormatQueryTests (m_context)); 357 } 358}; 359 360FunctionalTests::FunctionalTests (Context& context) 361 : TestCaseGroup(context, "functional", "Functionality Tests") 362{ 363} 364 365FunctionalTests::~FunctionalTests (void) 366{ 367} 368 369void FunctionalTests::init (void) 370{ 371 addChild(new PrerequisiteTests (m_context)); 372 addChild(new ImplementationLimitTests (m_context)); 373 addChild(new ColorClearTest (m_context)); 374 addChild(new DepthStencilClearTests (m_context)); 375 addChild(new BufferTests (m_context)); 376 addChild(new ShaderTests (m_context)); 377 addChild(new TextureTests (m_context)); 378 addChild(new FragmentOpTests (m_context)); 379 addChild(new FboTests (m_context)); 380 addChild(new VertexArrayTestGroup (m_context)); 381 addChild(new UniformBlockTests (m_context)); 382 addChild(new UniformApiTests (m_context)); 383 addChild(createAttributeLocationTests (m_context)); 384 addChild(new FragmentOutputTests (m_context)); 385 addChild(new SamplerObjectTests (m_context)); 386 addChild(new PixelBufferObjectTests (m_context)); 387 addChild(new RasterizationTests (m_context)); 388 addChild(new OcclusionQueryTests (m_context)); 389 addChild(new VertexArrayObjectTestGroup (m_context)); 390 addChild(new PrimitiveRestartTests (m_context)); 391 addChild(new InstancedRenderingTests (m_context)); 392 addChild(new RasterizerDiscardTests (m_context)); 393 addChild(new TransformFeedbackTests (m_context)); 394 addChild(new SyncTests (m_context)); 395 addChild(new ShaderApiTests (m_context)); 396 addChild(new NegativeApiTestGroup (m_context)); 397 addChild(new MultisampleTests (m_context)); 398 addChild(new ReadPixelsTests (m_context)); 399 addChild(new DitheringTests (m_context)); 400 addChild(new StateQueryTests (m_context)); 401 addChild(new ClippingTests (m_context)); 402 addChild(new PolygonOffsetTests (m_context)); 403 addChild(new DrawTests (m_context)); 404 addChild(new FlushFinishTests (m_context)); 405 addChild(new DefaultVertexAttributeTests(m_context)); 406 addChild(createLifetimeTests (m_context)); 407} 408 409} // Functional 410} // gles3 411} // deqp 412