framework: unify TestPackage behaviour between ES 3.1 and 3.2
authorTapani Pälli <tapani.palli@intel.com>
Wed, 17 Nov 2021 13:16:38 +0000 (15:16 +0200)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Thu, 6 Jan 2022 22:46:25 +0000 (22:46 +0000)
Main issue seen here was that ES 3.2 did not reset context state when
initializing TestCaseWrapper, this was causing different behaviour in
following tests:

  KHR-GLES31.core.draw_buffers_indexed.blending
  KHR-GLES32.core.draw_buffers_indexed.blending

Patch also fixes few other differences spotted.

Components: Framework, OpenGL

VK-GL-CTS issue: 3318

Affects:
   glcts
   cts-runner

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Change-Id: Ie5848e41eba64c3b76b526738e8612c8bebdfbfc

external/openglcts/modules/gles31/es31cTestPackage.cpp
external/openglcts/modules/gles32/es32cTestPackage.cpp

index 3ed6536..d9e6060 100644 (file)
@@ -159,6 +159,7 @@ ES31TestPackage::ES31TestPackage(tcu::TestContext& testCtx, const char* packageN
 
 ES31TestPackage::~ES31TestPackage(void)
 {
+       deqp::TestPackage::deinit();
 }
 
 class ShaderTests : public deqp::TestCaseGroup
index ab4fd0e..533d82b 100644 (file)
@@ -89,6 +89,8 @@ void TestCaseWrapper::init(tcu::TestCase* testCase, const std::string& path)
        if (m_waiverMechanism->isOnWaiverList(path))
                throw tcu::TestException("Waived test", QP_TEST_RESULT_WAIVER);
 
+       glu::resetState(m_testPackage.getContext().getRenderContext(), m_testPackage.getContext().getContextInfo());
+
        testCase->init();
 }
 
@@ -105,7 +107,7 @@ tcu::TestNode::IterateResult TestCaseWrapper::iterate(tcu::TestCase* testCase)
        glu::RenderContext&                      renderCtx = m_testPackage.getContext().getRenderContext();
        tcu::TestCase::IterateResult result;
 
-       // Clear to surrender-blue
+       // Clear to black
        {
                const glw::Functions& gl = renderCtx.getFunctions();
                gl.clearColor(0.0f, 0.0f, 0.0f, 1.f);