From 82e45ba63443f31cdbe01489080a83771580cd3d Mon Sep 17 00:00:00 2001 From: Alexander Galazin Date: Tue, 6 Jun 2017 13:22:58 +0200 Subject: [PATCH] Ignore A channel in EGL RGB5_A1 clear color tests Dithering can siginifcantly impact alpha channel and the framework can't fully account it. Components: AOSP Affects: dEQP-EGL.functional.color_clears.*.rgba5551* Bug: 62383988 Change-Id: Ic8fa4da1a840da56f74af3e076d0728d9abbdadc (cherry picked from commit 9da1b45a8ed2489a46dd698953d963fa8bfbf1e7) --- modules/egl/teglColorClearCase.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/egl/teglColorClearCase.cpp b/modules/egl/teglColorClearCase.cpp index e2006cb..8ae8b4c 100644 --- a/modules/egl/teglColorClearCase.cpp +++ b/modules/egl/teglColorClearCase.cpp @@ -244,7 +244,8 @@ void SingleThreadColorClearCase::executeForContexts (EGLDisplay display, EGLSurf // Compare images { - bool imagesOk = tcu::pixelThresholdCompare(log, "ComparisonResult", "Image comparison result", refFrame, frame, RGBA(1,1,1,1) + pixelFmt.getColorThreshold(), tcu::COMPARE_LOG_RESULT); + tcu::RGBA eps = pixelFmt.alphaBits == 1 ? RGBA(1,1,1,127) : RGBA(1,1,1,1); + bool imagesOk = tcu::pixelThresholdCompare(log, "ComparisonResult", "Image comparison result", refFrame, frame, eps + pixelFmt.getColorThreshold(), tcu::COMPARE_LOG_RESULT); if (!imagesOk) m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Image comparison failed"); @@ -430,7 +431,8 @@ void MultiThreadColorClearCase::executeForContexts (EGLDisplay display, EGLSurfa // Compare images { - bool imagesOk = tcu::pixelThresholdCompare(log, "ComparisonResult", "Image comparison result", refFrame, frame, RGBA(1,1,1,1) + pixelFmt.getColorThreshold(), tcu::COMPARE_LOG_RESULT); + tcu::RGBA eps = pixelFmt.alphaBits == 1 ? RGBA(1,1,1,127) : RGBA(1,1,1,1); + bool imagesOk = tcu::pixelThresholdCompare(log, "ComparisonResult", "Image comparison result", refFrame, frame, eps + pixelFmt.getColorThreshold(), tcu::COMPARE_LOG_RESULT); if (!imagesOk) m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Image comparison failed"); -- 2.7.4