Numbers larger than the maximum representable float16 value may round to
infinity for RTE rounding mode, or to the maximum representable value
65504 (0x7bff) for RTZ rounding mode.
Components: Vulkan
VK-GL-CTS issue: 1483
Affects:
dEQP-VK.spirv_assembly.instruction.compute.float16.arithmetic_*
dEQP-VK.spirv_assembly.instruction.graphics.float16.arithmetic_*
Change-Id: Id53eeb797e522db98bb070894a7c715507a4f05a
reportError = false;
}
+ if (reportError && expected.isInf())
+ {
+ // RTZ rounding mode returns +/-65504 instead of Inf on overflow
+ if (expected.sign() == 1 && outputted.bits() == 0x7bff && iterationEdgeMin[componentNdx] <= std::numeric_limits<double>::max())
+ reportError = false;
+ else if (expected.sign() == -1 && outputted.bits() == 0xfbff && iterationEdgeMax[componentNdx] >= -std::numeric_limits<double>::max())
+ reportError = false;
+ }
+
if (reportError)
{
const double outputtedDouble = outputted.asDouble();