1 /*-------------------------------------------------------------------------
2 * drawElements Quality Program OpenGL ES 3.1 Module
3 * -------------------------------------------------
5 * Copyright 2014 The Android Open Source Project
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
21 * \brief OpenGL ES 3.1 Test Package
22 *//*--------------------------------------------------------------------*/
24 #include "tes31TestPackage.hpp"
25 #include "tes31TestCaseWrapper.hpp"
26 #include "tes31InfoTests.hpp"
27 #include "es31fFunctionalTests.hpp"
28 #include "es31sStressTests.hpp"
29 #include "gluStateReset.hpp"
30 #include "gluRenderContext.hpp"
31 #include "gluContextInfo.hpp"
32 #include "tcuTestLog.hpp"
33 #include "tcuCommandLine.hpp"
34 #include "tcuWaiverUtil.hpp"
35 #include "glwEnums.hpp"
42 TestPackage::TestPackage (tcu::TestContext& testCtx)
43 : tcu::TestPackage (testCtx, "dEQP-GLES31", "dEQP OpenGL ES 3.1 Tests")
44 , m_archive (testCtx.getRootArchive(), "gles31/")
46 , m_waiverMechanism (new tcu::WaiverUtil)
50 TestPackage::~TestPackage (void)
52 // Destroy children first since destructors may access context.
57 void TestPackage::init (void)
62 // Some of the tests will test ES3.2 functionality if supported so try to create a 3.2 context
63 // first. If that doesn't work then create an ES3.1 context.
66 m_context = new Context(m_testCtx, glu::ApiType::es(3, 2));
70 m_context = new Context(m_testCtx, glu::ApiType::es(3, 1));
73 // Setup waiver mechanism
74 if (m_testCtx.getCommandLine().getRunMode() == tcu::RUNMODE_EXECUTE)
76 const glu::ContextInfo& contextInfo = m_context->getContextInfo();
77 std::string vendor = contextInfo.getString(GL_VENDOR);
78 std::string renderer = contextInfo.getString(GL_RENDERER);
79 const tcu::CommandLine& commandLine = m_context->getTestContext().getCommandLine();
80 tcu::SessionInfo sessionInfo (vendor, renderer, commandLine.getInitialCmdLine());
81 m_waiverMechanism->setup(commandLine.getWaiverFileName(), m_name, vendor, renderer, sessionInfo);
82 m_context->getTestContext().getLog().writeSessionInfo(sessionInfo.get());
85 // Add main test groups
86 addChild(new InfoTests (*m_context));
87 addChild(new Functional::GLES31FunctionalTests (*m_context));
88 addChild(new Stress::StressTests (*m_context));
99 void TestPackage::deinit (void)
106 tcu::TestCaseExecutor* TestPackage::createExecutor (void) const
108 return new TestCaseWrapper<TestPackage>(const_cast<TestPackage&>(*this), m_waiverMechanism);