13c827367444ee418f129b2c238299f49d3264554Jarkko Poyry/*------------------------------------------------------------------------- 23c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * drawElements Quality Program OpenGL ES 3.0 Module 33c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * ------------------------------------------------- 43c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * 53c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * Copyright 2014 The Android Open Source Project 63c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * 73c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * Licensed under the Apache License, Version 2.0 (the "License"); 83c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * you may not use this file except in compliance with the License. 93c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * You may obtain a copy of the License at 103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * 113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * http://www.apache.org/licenses/LICENSE-2.0 123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * 133c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * Unless required by applicable law or agreed to in writing, software 143c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * distributed under the License is distributed on an "AS IS" BASIS, 153c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * See the License for the specific language governing permissions and 173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * limitations under the License. 183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * 193c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *//*! 203c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * \file 213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * \brief OpenGL ES 3.0 Test Package 223c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *//*--------------------------------------------------------------------*/ 233c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "tes3TestPackage.hpp" 253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "tes3InfoTests.hpp" 263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "es3fFunctionalTests.hpp" 273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "es3aAccuracyTests.hpp" 283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "es3sStressTests.hpp" 293c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "es3pPerformanceTests.hpp" 303c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 313c827367444ee418f129b2c238299f49d3264554Jarkko Poyrynamespace deqp 323c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 333c827367444ee418f129b2c238299f49d3264554Jarkko Poyrynamespace gles3 343c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 353c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 363c827367444ee418f129b2c238299f49d3264554Jarkko PoyryPackageContext::PackageContext (tcu::TestContext& testCtx) 373c827367444ee418f129b2c238299f49d3264554Jarkko Poyry : m_context (DE_NULL) 383c827367444ee418f129b2c238299f49d3264554Jarkko Poyry , m_caseWrapper (DE_NULL) 393c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 403c827367444ee418f129b2c238299f49d3264554Jarkko Poyry try 413c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 423c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_context = new Context(testCtx); 433c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_caseWrapper = new TestCaseWrapper(testCtx, m_context->getRenderContext()); 443c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 453c827367444ee418f129b2c238299f49d3264554Jarkko Poyry catch (...) 463c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 473c827367444ee418f129b2c238299f49d3264554Jarkko Poyry delete m_caseWrapper; 483c827367444ee418f129b2c238299f49d3264554Jarkko Poyry delete m_context; 493c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 503c827367444ee418f129b2c238299f49d3264554Jarkko Poyry throw; 513c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 523c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} 533c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 543c827367444ee418f129b2c238299f49d3264554Jarkko PoyryPackageContext::~PackageContext (void) 553c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 563c827367444ee418f129b2c238299f49d3264554Jarkko Poyry delete m_caseWrapper; 573c827367444ee418f129b2c238299f49d3264554Jarkko Poyry delete m_context; 583c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} 593c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 603c827367444ee418f129b2c238299f49d3264554Jarkko PoyryTestPackage::TestPackage (tcu::TestContext& testCtx) 613c827367444ee418f129b2c238299f49d3264554Jarkko Poyry : tcu::TestPackage (testCtx, "dEQP-GLES3", "dEQP OpenGL ES 3.0 Tests") 623c827367444ee418f129b2c238299f49d3264554Jarkko Poyry , m_packageCtx (DE_NULL) 633c827367444ee418f129b2c238299f49d3264554Jarkko Poyry , m_archive (testCtx.getRootArchive(), "gles3/") 643c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 653c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} 663c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 673c827367444ee418f129b2c238299f49d3264554Jarkko PoyryTestPackage::~TestPackage (void) 683c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 693c827367444ee418f129b2c238299f49d3264554Jarkko Poyry // Destroy children first since destructors may access context. 703c827367444ee418f129b2c238299f49d3264554Jarkko Poyry TestNode::deinit(); 713c827367444ee418f129b2c238299f49d3264554Jarkko Poyry delete m_packageCtx; 723c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} 733c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 743c827367444ee418f129b2c238299f49d3264554Jarkko Poyryvoid TestPackage::init (void) 753c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 763c827367444ee418f129b2c238299f49d3264554Jarkko Poyry try 773c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 783c827367444ee418f129b2c238299f49d3264554Jarkko Poyry // Create context 793c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_packageCtx = new PackageContext(m_testCtx); 803c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 813c827367444ee418f129b2c238299f49d3264554Jarkko Poyry // Add main test groups 823c827367444ee418f129b2c238299f49d3264554Jarkko Poyry addChild(new InfoTests (m_packageCtx->getContext())); 833c827367444ee418f129b2c238299f49d3264554Jarkko Poyry addChild(new Functional::FunctionalTests (m_packageCtx->getContext())); 843c827367444ee418f129b2c238299f49d3264554Jarkko Poyry addChild(new Accuracy::AccuracyTests (m_packageCtx->getContext())); 853c827367444ee418f129b2c238299f49d3264554Jarkko Poyry addChild(new Performance::PerformanceTests (m_packageCtx->getContext())); 863c827367444ee418f129b2c238299f49d3264554Jarkko Poyry addChild(new Stress::StressTests (m_packageCtx->getContext())); 873c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 883c827367444ee418f129b2c238299f49d3264554Jarkko Poyry catch (...) 893c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 903c827367444ee418f129b2c238299f49d3264554Jarkko Poyry delete m_packageCtx; 913c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_packageCtx = DE_NULL; 923c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 933c827367444ee418f129b2c238299f49d3264554Jarkko Poyry throw; 943c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 953c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} 963c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 973c827367444ee418f129b2c238299f49d3264554Jarkko Poyryvoid TestPackage::deinit (void) 983c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 993c827367444ee418f129b2c238299f49d3264554Jarkko Poyry TestNode::deinit(); 1003c827367444ee418f129b2c238299f49d3264554Jarkko Poyry delete m_packageCtx; 1013c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_packageCtx = DE_NULL; 1023c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} 1033c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1043c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} // gles3 1053c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} // deqp 106