modules/gles31/tes31TestCase.cpp \
modules/gles31/tes31TestPackage.cpp \
modules/gles31/tes31TestPackageEntry.cpp \
+ modules/gles31/tgl45TestPackage.cpp \
modules/glshared/glsAttributeLocationTests.cpp \
modules/glshared/glsBufferTestUtil.cpp \
modules/glshared/glsBuiltinPrecisionTests.cpp \
#include "es31cTestPackage.hpp"
#include "esextcTestPackage.hpp"
#include "tes31TestPackage.hpp"
+#include "tgl45TestPackage.hpp"
#if defined(DEQP_GTF_AVAILABLE)
#include "gtfES31TestPackage.hpp"
{
return new deqp::gles31::TestPackage(testCtx);
}
+static tcu::TestPackage* createdEQPGL45Package(tcu::TestContext& testCtx)
+{
+ return new deqp::gles31::TestPackageGL45(testCtx);
+}
#endif
static tcu::TestPackage* createES31Package(tcu::TestContext& testCtx)
{
#if DE_OS != DE_OS_ANDROID
registry->registerPackage("dEQP-GLES31", createdEQPES31Package);
+ registry->registerPackage("dEQP-GL45", createdEQPGL45Package);
#endif
registry->registerPackage("KHR-GLES31", createES31Package);
registry->registerPackage("KHR-GLESEXT", createESEXTPackage);
tes31TestCase.hpp
tes31TestPackage.cpp
tes31TestPackage.hpp
+ tgl45TestPackage.cpp
+ tgl45TestPackage.hpp
)
set(DEQP_GLES31_LIBS
*//*--------------------------------------------------------------------*/
#include "tes31Context.hpp"
-#include "gluRenderContext.hpp"
#include "gluRenderConfig.hpp"
#include "gluFboRenderContext.hpp"
#include "gluContextInfo.hpp"
namespace gles31
{
-Context::Context (tcu::TestContext& testCtx)
+Context::Context (tcu::TestContext& testCtx, glu::ApiType apiType)
: m_testCtx (testCtx)
, m_renderCtx (DE_NULL)
, m_contextInfo (DE_NULL)
+ , m_apiType (apiType)
{
if (m_testCtx.getCommandLine().getRunMode() == tcu::RUNMODE_EXECUTE)
createRenderContext();
{
try
{
- m_renderCtx = glu::createDefaultRenderContext(m_testCtx.getPlatform(), m_testCtx.getCommandLine(), glu::ApiType::es(3, 2));
+ m_renderCtx = glu::createDefaultRenderContext(m_testCtx.getPlatform(), m_testCtx.getCommandLine(), m_apiType);
}
catch (...)
{
- m_renderCtx = glu::createDefaultRenderContext(m_testCtx.getPlatform(), m_testCtx.getCommandLine(), glu::ApiType::es(3, 1));
+ m_apiType = glu::ApiType::es(3, 1);
+ m_renderCtx = glu::createDefaultRenderContext(m_testCtx.getPlatform(), m_testCtx.getCommandLine(), m_apiType);
}
m_contextInfo = glu::ContextInfo::create(*m_renderCtx);
}
#include "tcuDefs.hpp"
#include "tcuTestContext.hpp"
+#include "gluRenderContext.hpp"
namespace glu
{
class Context
{
public:
- Context (tcu::TestContext& testCtx);
+ Context (tcu::TestContext& testCtx, glu::ApiType apiType = glu::ApiType::es(3,2));
~Context (void);
tcu::TestContext& getTestContext (void) { return m_testCtx; }
tcu::TestContext& m_testCtx;
glu::RenderContext* m_renderCtx;
glu::ContextInfo* m_contextInfo;
+ glu::ApiType m_apiType;
};
} // gles31
--- /dev/null
+#ifndef _TES31TESTCASEWRAPPER_HPP
+#define _TES31TESTCASEWRAPPER_HPP
+/*-------------------------------------------------------------------------
+ * OpenGL Conformance Test Suite
+ * -----------------------------
+ *
+ * Copyright (c) 2019 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */ /*!
+ * \file
+ * \brief OpenGL ES 3.1 Test Package that runs on GL4.5 context
+ *//*--------------------------------------------------------------------*/
+
+#include "tcuTestLog.hpp"
+#include "tes31Context.hpp"
+#include "tcuWaiverUtil.hpp"
+#include "gluStateReset.hpp"
+
+namespace deqp
+{
+namespace gles31
+{
+
+template <typename TEST_PACKAGE>
+class TestCaseWrapper : public tcu::TestCaseExecutor
+{
+public:
+ TestCaseWrapper (TEST_PACKAGE& package, de::SharedPtr<tcu::WaiverUtil> waiverMechanism);
+ ~TestCaseWrapper (void);
+
+ void init (tcu::TestCase* testCase, const std::string& path);
+ void deinit (tcu::TestCase* testCase);
+ tcu::TestNode::IterateResult iterate (tcu::TestCase* testCase);
+
+private:
+ TEST_PACKAGE& m_testPackage;
+ de::SharedPtr<tcu::WaiverUtil> m_waiverMechanism;
+};
+
+template <typename TEST_PACKAGE>
+TestCaseWrapper<TEST_PACKAGE>::TestCaseWrapper (TEST_PACKAGE& package, de::SharedPtr<tcu::WaiverUtil> waiverMechanism)
+ : m_testPackage(package)
+ , m_waiverMechanism (waiverMechanism)
+{
+}
+
+template <typename TEST_PACKAGE>
+TestCaseWrapper<TEST_PACKAGE>::~TestCaseWrapper (void)
+{
+}
+
+template <typename TEST_PACKAGE>
+void TestCaseWrapper<TEST_PACKAGE>::init (tcu::TestCase* testCase, const std::string& path)
+{
+ if (m_waiverMechanism->isOnWaiverList(path))
+ throw tcu::TestException("Waived test", QP_TEST_RESULT_WAIVER);
+
+ testCase->init();
+}
+
+template <typename TEST_PACKAGE>
+void TestCaseWrapper<TEST_PACKAGE>::deinit (tcu::TestCase* testCase)
+{
+ testCase->deinit();
+
+ DE_ASSERT(m_testPackage.getContext());
+ glu::resetState(m_testPackage.getContext()->getRenderContext(), m_testPackage.getContext()->getContextInfo());
+}
+
+template <typename TEST_PACKAGE>
+tcu::TestNode::IterateResult TestCaseWrapper<TEST_PACKAGE>::iterate (tcu::TestCase* testCase)
+{
+ tcu::TestContext& testCtx = m_testPackage.getContext()->getTestContext();
+ const tcu::TestCase::IterateResult result = testCase->iterate();
+
+ // Call implementation specific post-iterate routine (usually handles native events and swaps buffers)
+ try
+ {
+ m_testPackage.getContext()->getRenderContext().postIterate();
+ return result;
+ }
+ catch (const tcu::ResourceError& e)
+ {
+ testCtx.getLog() << e;
+ testCtx.setTestResult(QP_TEST_RESULT_RESOURCE_ERROR, "Resource error in context post-iteration routine");
+ testCtx.setTerminateAfter(true);
+ return tcu::TestNode::STOP;
+ }
+ catch (const std::exception& e)
+ {
+ testCtx.getLog() << e;
+ testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Error in context post-iteration routine");
+ return tcu::TestNode::STOP;
+ }
+}
+
+} // gles31
+} // deqp
+
+#endif // _TES31TESTCASEWRAPPER_HPP
*//*--------------------------------------------------------------------*/
#include "tes31TestPackage.hpp"
+#include "tes31TestCaseWrapper.hpp"
#include "tes31InfoTests.hpp"
#include "es31fFunctionalTests.hpp"
#include "es31sStressTests.hpp"
namespace gles31
{
-class TestCaseWrapper : public tcu::TestCaseExecutor
-{
-public:
- TestCaseWrapper (TestPackage& package, de::SharedPtr<tcu::WaiverUtil> waiverMechanism);
- ~TestCaseWrapper (void);
-
- void init (tcu::TestCase* testCase, const std::string& path);
- void deinit (tcu::TestCase* testCase);
- tcu::TestNode::IterateResult iterate (tcu::TestCase* testCase);
-
-private:
- TestPackage& m_testPackage;
- de::SharedPtr<tcu::WaiverUtil> m_waiverMechanism;
-};
-
-TestCaseWrapper::TestCaseWrapper (TestPackage& package, de::SharedPtr<tcu::WaiverUtil> waiverMechanism)
- : m_testPackage (package)
- , m_waiverMechanism (waiverMechanism)
-{
-}
-
-TestCaseWrapper::~TestCaseWrapper (void)
-{
-}
-
-void TestCaseWrapper::init (tcu::TestCase* testCase, const std::string& path)
-{
- if (m_waiverMechanism->isOnWaiverList(path))
- throw tcu::TestException("Waived test", QP_TEST_RESULT_WAIVER);
-
- testCase->init();
-}
-
-void TestCaseWrapper::deinit (tcu::TestCase* testCase)
-{
- testCase->deinit();
-
- DE_ASSERT(m_testPackage.getContext());
- glu::resetState(m_testPackage.getContext()->getRenderContext(), m_testPackage.getContext()->getContextInfo());
-}
-
-tcu::TestNode::IterateResult TestCaseWrapper::iterate (tcu::TestCase* testCase)
-{
- tcu::TestContext& testCtx = m_testPackage.getContext()->getTestContext();
- const tcu::TestCase::IterateResult result = testCase->iterate();
-
- // Call implementation specific post-iterate routine (usually handles native events and swaps buffers)
- try
- {
- m_testPackage.getContext()->getRenderContext().postIterate();
- return result;
- }
- catch (const tcu::ResourceError& e)
- {
- testCtx.getLog() << e;
- testCtx.setTestResult(QP_TEST_RESULT_RESOURCE_ERROR, "Resource error in context post-iteration routine");
- testCtx.setTerminateAfter(true);
- return tcu::TestNode::STOP;
- }
- catch (const std::exception& e)
- {
- testCtx.getLog() << e;
- testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Error in context post-iteration routine");
- return tcu::TestNode::STOP;
- }
-}
-
TestPackage::TestPackage (tcu::TestContext& testCtx)
: tcu::TestPackage (testCtx, "dEQP-GLES31", "dEQP OpenGL ES 3.1 Tests")
, m_archive (testCtx.getRootArchive(), "gles31/")
tcu::TestCaseExecutor* TestPackage::createExecutor (void) const
{
- return new TestCaseWrapper(const_cast<TestPackage&>(*this), m_waiverMechanism);
+ return new TestCaseWrapper<TestPackage>(const_cast<TestPackage&>(*this), m_waiverMechanism);
}
} // gles31
--- /dev/null
+/*-------------------------------------------------------------------------
+ * drawElements Quality Program OpenGL ES 3.1 Module
+ * -------------------------------------------------
+ *
+ * Copyright 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *//*!
+ * \file
+ * \brief OpenGL ES 3.1 Test Package that runs on GL4.5 context
+ *//*--------------------------------------------------------------------*/
+
+#include "tgl45TestPackage.hpp"
+#include "tes31TestCaseWrapper.hpp"
+#include "tes31InfoTests.hpp"
+#include "es31fFunctionalTests.hpp"
+#include "es31sStressTests.hpp"
+#include "gluStateReset.hpp"
+#include "gluRenderContext.hpp"
+#include "gluContextInfo.hpp"
+#include "tcuTestLog.hpp"
+#include "tcuCommandLine.hpp"
+#include "tcuWaiverUtil.hpp"
+#include "glwEnums.hpp"
+
+namespace deqp
+{
+namespace gles31
+{
+
+TestPackageGL45::TestPackageGL45 (tcu::TestContext& testCtx)
+ : tcu::TestPackage (testCtx, "dEQP-GL45", "dEQP OpenGL ES 3.1 Tests On GL4.5 Context")
+ , m_archive (testCtx.getRootArchive(), "gles31/")
+ , m_context (DE_NULL)
+ , m_waiverMechanism (new tcu::WaiverUtil)
+{
+}
+
+TestPackageGL45::~TestPackageGL45 (void)
+{
+ // Destroy children first since destructors may access context.
+ TestNode::deinit();
+ delete m_context;
+}
+
+void TestPackageGL45::init (void)
+{
+ try
+ {
+ // Create context
+ m_context = new Context(m_testCtx, glu::ApiType::core(4, 5));
+
+ // Setup waiver mechanism
+ if (m_testCtx.getCommandLine().getRunMode() == tcu::RUNMODE_EXECUTE)
+ {
+ const glu::ContextInfo& contextInfo = m_context->getContextInfo();
+ std::string vendor = contextInfo.getString(GL_VENDOR);
+ std::string renderer = contextInfo.getString(GL_RENDERER);
+ const tcu::CommandLine& commandLine = m_context->getTestContext().getCommandLine();
+ tcu::SessionInfo sessionInfo (vendor, renderer, commandLine.getInitialCmdLine());
+ m_waiverMechanism->setup(commandLine.getWaiverFileName(), m_name, vendor, renderer, sessionInfo);
+ m_context->getTestContext().getLog().writeSessionInfo(sessionInfo.get());
+ }
+
+ // Add main test groups
+ addChild(new InfoTests (*m_context));
+ addChild(new Functional::FunctionalTests (*m_context));
+ }
+ catch (...)
+ {
+ delete m_context;
+ m_context = DE_NULL;
+
+ throw;
+ }
+}
+
+void TestPackageGL45::deinit (void)
+{
+ TestNode::deinit();
+ delete m_context;
+ m_context = DE_NULL;
+}
+
+tcu::TestCaseExecutor* TestPackageGL45::createExecutor (void) const
+{
+ return new TestCaseWrapper<TestPackageGL45>(const_cast<TestPackageGL45&>(*this), m_waiverMechanism);
+}
+
+} // gles31
+} // deqp
--- /dev/null
+#ifndef _TGL45TESTPACKAGE_HPP
+#define _TGL45TESTPACKAGE_HPP
+/*-------------------------------------------------------------------------
+ * OpenGL Conformance Test Suite
+ * -----------------------------
+ *
+ * Copyright (c) 2019 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */ /*!
+ * \file
+ * \brief OpenGL ES 3.1 Test Package that runs on GL4.5 context
+ *//*--------------------------------------------------------------------*/
+
+#include "tcuDefs.hpp"
+#include "tcuTestPackage.hpp"
+#include "tes31Context.hpp"
+#include "tcuResource.hpp"
+#include "deSharedPtr.hpp"
+
+namespace tcu
+{
+ class WaiverUtil;
+};
+
+namespace deqp
+{
+namespace gles31
+{
+
+class TestPackageGL45 : public tcu::TestPackage
+{
+public:
+ TestPackageGL45 (tcu::TestContext& testCtx);
+ virtual ~TestPackageGL45 (void);
+
+ virtual void init (void);
+ virtual void deinit (void);
+
+ tcu::TestCaseExecutor* createExecutor (void) const;
+
+ tcu::Archive* getArchive (void) { return &m_archive; }
+ Context* getContext (void) { return m_context; }
+
+private:
+ tcu::ResourcePrefix m_archive;
+ Context* m_context;
+ de::SharedPtr<tcu::WaiverUtil> m_waiverMechanism;
+};
+
+} // gles31
+} // deqp
+
+#endif // _TGL45TESTPACKAGE_HPP