1 /*-------------------------------------------------------------------------
2 * drawElements Quality Program OpenGL ES 3.1 Module
3 * -------------------------------------------------
5 * Copyright 2019 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 that runs on GL4.5 context
22 *//*--------------------------------------------------------------------*/
24 #include "tgl45es31TestPackage.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 TestPackageGL45ES31::TestPackageGL45ES31 (tcu::TestContext& testCtx)
43 : tcu::TestPackage (testCtx, "dEQP-GL45-ES31", "dEQP OpenGL ES 3.1 Tests On GL4.5 Context")
44 , m_archive (testCtx.getRootArchive(), "gles31/")
46 , m_waiverMechanism (new tcu::WaiverUtil)
50 TestPackageGL45ES31::~TestPackageGL45ES31 (void)
52 // Destroy children first since destructors may access context.
57 void TestPackageGL45ES31::init (void)
62 m_context = new Context(m_testCtx, glu::ApiType::core(4, 5));
64 // Setup waiver mechanism
65 if (m_testCtx.getCommandLine().getRunMode() == tcu::RUNMODE_EXECUTE)
67 const glu::ContextInfo& contextInfo = m_context->getContextInfo();
68 std::string vendor = contextInfo.getString(GL_VENDOR);
69 std::string renderer = contextInfo.getString(GL_RENDERER);
70 const tcu::CommandLine& commandLine = m_context->getTestContext().getCommandLine();
71 tcu::SessionInfo sessionInfo (vendor, renderer, commandLine.getInitialCmdLine());
72 m_waiverMechanism->setup(commandLine.getWaiverFileName(), m_name, vendor, renderer, sessionInfo);
73 m_context->getTestContext().getLog().writeSessionInfo(sessionInfo.get());
76 // Add main test groups
77 addChild(new InfoTests (*m_context));
78 addChild(new Functional::GL45ES31FunctionalTests (*m_context));
89 void TestPackageGL45ES31::deinit (void)
96 tcu::TestCaseExecutor* TestPackageGL45ES31::createExecutor (void) const
98 return new TestCaseWrapper<TestPackageGL45ES31>(const_cast<TestPackageGL45ES31&>(*this), m_waiverMechanism);