From: Pyry Haulos Date: Fri, 13 Feb 2015 18:58:03 +0000 (-0800) Subject: Relax mediump interpolation accuracy requirements and clarify thresholds X-Git-Tag: upstream/0.1.0~1788^2^2^2~6^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2cd1e178d456ed3fe617603abffebda7bb18075d;p=platform%2Fupstream%2FVK-GL-CTS.git Relax mediump interpolation accuracy requirements and clarify thresholds This change relaxes mediump interpolation accuracy in dEQP-GLES3.functional.fragment_out.* to 4 ULP from 1 ULP. Threshold computation is also fixed/clarified by moving interpolation threshold to be dependent on precision qualifier, and allowing only rounding difference in format-dependent threshold. The original error was likely due to incorrectly accomodating for interpolation in format threshold. Bug: 19380820 Change-Id: I457a9b7e07bad94399d07f37caa29d65ad95a5c8 --- diff --git a/modules/gles3/functional/es3fFragmentOutputTests.cpp b/modules/gles3/functional/es3fFragmentOutputTests.cpp index 319dcc9..f7fb0ad 100644 --- a/modules/gles3/functional/es3fFragmentOutputTests.cpp +++ b/modules/gles3/functional/es3fFragmentOutputTests.cpp @@ -825,21 +825,23 @@ FragmentOutputCase::IterateResult FragmentOutputCase::iterate (void) deUint32 precThreshold = 0; //!< Threshold computed based on output type precision UVec4 finalThreshold; + // 1 ULP rounding error is allowed for smaller floating-point formats switch (format.type) { - case tcu::TextureFormat::FLOAT: formatThreshold = UVec4(4); break; - case tcu::TextureFormat::HALF_FLOAT: formatThreshold = UVec4((1<<13) + 4); break; - case tcu::TextureFormat::UNSIGNED_INT_11F_11F_10F_REV: formatThreshold = UVec4((1<<17) + 4, (1<<17)+4, (1<<18)+4, 4); break; + case tcu::TextureFormat::FLOAT: formatThreshold = UVec4(0); break; + case tcu::TextureFormat::HALF_FLOAT: formatThreshold = UVec4((1<<(23-10))); break; + case tcu::TextureFormat::UNSIGNED_INT_11F_11F_10F_REV: formatThreshold = UVec4((1<<(23-6)), (1<<(23-6)), (1<<(23-5)), 0); break; default: DE_ASSERT(false); break; } + // 4 ULP interpolation switch (outPrecision) { - case glu::PRECISION_LOWP: precThreshold = (1<<21); break; - case glu::PRECISION_MEDIUMP: precThreshold = (1<<13); break; - case glu::PRECISION_HIGHP: precThreshold = 0; break; + case glu::PRECISION_LOWP: precThreshold = (4<<(23-8)); break; + case glu::PRECISION_MEDIUMP: precThreshold = (4<<(23-10)); break; + case glu::PRECISION_HIGHP: precThreshold = 4; break; default: DE_ASSERT(false); }