From 22655d8e1abbb8e6b0fba9d3a6cd68b1a1709028 Mon Sep 17 00:00:00 2001 From: Alex Walters Date: Mon, 14 Oct 2019 17:32:12 +0100 Subject: [PATCH] Make texture aniso basic self tests less sensitive The tests cases first check with a fuzzy diff that the images are more or less the same. The second diff then checks with a standard image comparison + tolerance that the images are not identical. Some of IMG's implementations produce a closer image than the test is currently expecting - we need to lower the tolerance from 0.05 to 0.02 in order for the diff algorithm to detect that the images are different 'enough'. Though there is no actual spec requirement, it is 'generally going to be the case', for any implementation, that the images will have some amount of difference. It is potentially useful to still have this test inplace to check againsty aniso being accidently disabled in the tested implementation, rather than remove it altogether. Affects: dEQP-VK.texture.filtering_anisotropy.basic.* Components: Vulkan VK-GL-CTS Issue: 2047 Change-Id: Ia9148e12172ac1c4757f5007e57b3a2b3a3434eb --- .../modules/vulkan/texture/vktTextureFilteringAnisotropyTests.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/external/vulkancts/modules/vulkan/texture/vktTextureFilteringAnisotropyTests.cpp b/external/vulkancts/modules/vulkan/texture/vktTextureFilteringAnisotropyTests.cpp index f987a81..aa31693 100644 --- a/external/vulkancts/modules/vulkan/texture/vktTextureFilteringAnisotropyTests.cpp +++ b/external/vulkancts/modules/vulkan/texture/vktTextureFilteringAnisotropyTests.cpp @@ -137,10 +137,12 @@ public: return tcu::TestStatus::fail("Fail"); // Anisotropic filtering is implementation dependent. Expecting differences with minification/magnification filter set to NEAREST is too strict. + // The specification does not require that your aniso & bi-linear filtering are different even in LINEAR, but this check is 'generally' going + // to detect *some* difference and possibly be useful in catching issues where an implementation hasn't setup their filtering modes correctly. if (m_refParams.minFilter != tcu::Sampler::NEAREST && m_refParams.magFilter != tcu::Sampler::NEAREST) { if (floatThresholdCompare (m_context.getTestContext().getLog(), "Expecting comparison to fail", "Expecting comparison to fail", - renderedFrame.getAccess(), renderedAnisotropyFrame.getAccess(), Vec4(0.05f), tcu::COMPARE_LOG_RESULT)) + renderedFrame.getAccess(), renderedAnisotropyFrame.getAccess(), Vec4(0.02f), tcu::COMPARE_LOG_RESULT)) return tcu::TestStatus::fail("Fail"); } } -- 2.7.4