From: Jarkko Pöyry Date: Fri, 3 Apr 2015 21:16:33 +0000 (-0700) Subject: Increase threshold in layout_binding tests. X-Git-Tag: upstream/0.1.0~1799^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d55a0267adbac8c78e06ed563aac3003cbc51ad2;p=platform%2Fupstream%2FVK-GL-CTS.git Increase threshold in layout_binding tests. Bug: 19990291 Change-Id: I3292bdd7077546adbdd88240362166d53905f804 --- diff --git a/modules/gles31/functional/es31fLayoutBindingTests.cpp b/modules/gles31/functional/es31fLayoutBindingTests.cpp index 70672ca..9c6b557 100644 --- a/modules/gles31/functional/es31fLayoutBindingTests.cpp +++ b/modules/gles31/functional/es31fLayoutBindingTests.cpp @@ -526,9 +526,16 @@ void LayoutBindingRenderCase::initRenderState (void) bool LayoutBindingRenderCase::drawAndVerifyResult (const Vec4& expectedColor) { - const glw::Functions& gl = m_context.getRenderContext().getFunctions(); - const tcu::RGBA threshold = m_context.getRenderContext().getRenderTarget().getPixelFormat().getColorThreshold(); - tcu::Surface reference (TEST_RENDER_WIDTH, TEST_RENDER_HEIGHT); + const glw::Functions& gl = m_context.getRenderContext().getFunctions(); + tcu::Surface reference (TEST_RENDER_WIDTH, TEST_RENDER_HEIGHT); + + // the point of these test is to check layout_binding. For this purpose, we can use quite + // large thresholds. + const tcu::RGBA surfaceThreshold = m_context.getRenderContext().getRenderTarget().getPixelFormat().getColorThreshold(); + const tcu::RGBA compareThreshold = tcu::RGBA(de::clamp(2 * surfaceThreshold.getRed(), 0, 255), + de::clamp(2 * surfaceThreshold.getGreen(), 0, 255), + de::clamp(2 * surfaceThreshold.getBlue(), 0, 255), + de::clamp(2 * surfaceThreshold.getAlpha(), 0, 255)); gl.clear(GL_COLOR_BUFFER_BIT); @@ -543,9 +550,9 @@ bool LayoutBindingRenderCase::drawAndVerifyResult (const Vec4& expectedColor) GLU_EXPECT_NO_ERROR(gl.getError(), "Read pixels failed"); tcu::clear(reference.getAccess(), expectedColor); - m_testCtx.getLog() << tcu::TestLog::Message << "Verifying output image" << tcu::TestLog::EndMessage; + m_testCtx.getLog() << tcu::TestLog::Message << "Verifying output image, fragment output color is " << expectedColor << tcu::TestLog::EndMessage; - return tcu::pixelThresholdCompare(m_testCtx.getLog(), "Render result", "Result verification", reference, result, threshold, tcu::COMPARE_LOG_RESULT); + return tcu::pixelThresholdCompare(m_testCtx.getLog(), "Render result", "Result verification", reference, result, compareThreshold, tcu::COMPARE_LOG_RESULT); } void LayoutBindingRenderCase::setTestResult (bool queryTestPassed, bool imageTestPassed)