From 4b3c1eca1d8c11881a3dd4c0d7c950d1e7a33e39 Mon Sep 17 00:00:00 2001 From: Graeme Leese Date: Thu, 27 Jun 2019 11:31:36 +0100 Subject: [PATCH] Fix more 16bit denorms in precision tests The denorm code that was fixed in: https://gerrit.khronos.org/#/c/4135/ still persisted in a different function that I hadn't noticed. Update it there as well. Because this function is being called on fixed floats, rather than on random ones, I don't think the brokenness of the old code will cause a practical problem, but the new version is simpler and more correct, so I've changed it anyway. Components: Vulkan VK-GL-CTS issue: 1843 Affects: dEQP-VK.glsl.builtin.precision_fp16_storage32b.* Change-Id: I6d6d7f8678f6edf41255e194650648c865b71e76 --- .../modules/vulkan/shaderexecutor/vktShaderBuiltinPrecisionTests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/vulkancts/modules/vulkan/shaderexecutor/vktShaderBuiltinPrecisionTests.cpp b/external/vulkancts/modules/vulkan/shaderexecutor/vktShaderBuiltinPrecisionTests.cpp index f2a7b1c..4fee160 100644 --- a/external/vulkancts/modules/vulkan/shaderexecutor/vktShaderBuiltinPrecisionTests.cpp +++ b/external/vulkancts/modules/vulkan/shaderexecutor/vktShaderBuiltinPrecisionTests.cpp @@ -5243,7 +5243,7 @@ void DefaultSampling::removeNotInRange (vector& dst, const Interva { for (vector::iterator it = dst.begin(); it < dst.end();) { - if ( !inputRange.contains(static_cast(*it)) || (glu::PRECISION_LAST == prec && (1.0 - deAbs(static_cast(*it)) >= 0.999939))) + if ( !inputRange.contains(static_cast(*it)) || (prec == glu::PRECISION_LAST && isDenorm16(deFloat32To16Round(*it, DE_ROUNDINGMODE_TO_ZERO)))) it = dst.erase(it); else ++it; -- 2.7.4