Allow NaN result when result exceeds limit
authorMohankumar Nekkarakalaya <mnekkara@qti.qualcomm.com>
Thu, 21 Oct 2021 00:14:08 +0000 (17:14 -0700)
committerMohankumar Nekkarakalaya <mnekkara@qti.qualcomm.com>
Fri, 29 Oct 2021 03:13:55 +0000 (20:13 -0700)
commitc881d23a8fd45aa7c830420712704d573d74b4c4
tree26a9ec121828e71bf3f247812e89080db2af2462
parenta7c1ea8038d38d3528c85172402b667bb9f30a12
Allow NaN result when result exceeds limit

Based on spec if the result is too large to be represented
in the floating point the result is undefined.

Issue was found with ldexp. Since fix is applicable in general
updated the isFinite() to take maxValue and checks the interval value
with the allowed max value in the context (and similarly for
negative numbers). If the result is beyond the 32-bit
floating-point representation expected result is unbounded

Components: Vulkan, OpenGL, Framework

VK-GL-CTS Issue: 3138

Affected tests:
dEQP-VK.glsl.builtin.function.*
dEQP-VK.glsl.builtin.precision.*
dEQP-GLES31.functional.shaders.builtin_functions.precision.*
dEQP-GLES31.functional.shaders.builtin_functions.common.fma.*

Change-Id: Iba27d6b0d7d0bc433a1d0c055cef6f6a61b239ba
external/vulkancts/modules/vulkan/shaderexecutor/vktShaderBuiltinPrecisionTests.cpp
framework/common/tcuInterval.hpp
modules/gles31/functional/es31fShaderCommonFunctionTests.cpp
modules/glshared/glsBuiltinPrecisionTests.cpp