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
}
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(),