Increase threshold GLES3 blend tests
authorJuan A. Suarez Romero <jasuarez@igalia.com>
Wed, 20 Jun 2018 16:37:58 +0000 (18:37 +0200)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Sun, 8 Jul 2018 14:12:26 +0000 (10:12 -0400)
The threshold used in dEQP-GLES3.functional.fragment_ops.blend.* is
computed using a non-scientific ad hoc formula.

As stated in a comment, when using few color bits, the blend operations
brings extra inaccuracy, which requires to increase the threshold.

Apparently, the current threshold value is not enough when using a RGB565
configuration, and it should be increased.

Moreover, the threshold used in GLES2 blend tests is a bit bigger, and
using this threshold for the GLES3 blend tests fixes the problems with
RGB565.

Thus this commit applies the GLES2 blend tests threshold to GLES3 tests.

Affects:
dEQP-GLES3.functional.fragment_ops.blend.default_framebuffer.*

Components: OpenGL

VK-GL-CTS issue: 1230

Change-Id: I7269768a9591fc70532312d8cc13481252a6f6e2

modules/gles3/functional/es3fBlendTests.cpp

index f074b22..6d6ab3f 100644 (file)
@@ -325,7 +325,7 @@ BlendCase::IterateResult BlendCase::iterate (void)
        }
 
        UVec4 compareThreshold = (m_useSrgbFbo ? tcu::PixelFormat(8, 8, 8, 8) : m_context.getRenderTarget().getPixelFormat()).getColorThreshold().toIVec().asUint()
-                                                        * UVec4(5) / UVec4(2) + UVec4(m_useSrgbFbo ? 5 : 2); // \note Non-scientific ad hoc formula. Need big threshold when few color bits; blending brings extra inaccuracy.
+                                                        * UVec4(5) / UVec4(2) + UVec4(m_useSrgbFbo ? 5 : 3); // \note Non-scientific ad hoc formula. Need big threshold when few color bits; blending brings extra inaccuracy.
 
        bool comparePass = tcu::intThresholdCompare(m_testCtx.getLog(), "CompareResult", "Image Comparison Result",
                                                                                                referenceImg.getAccess(), renderedImg.getAccess(),