Add precision error margin to cos() tests for float_controls
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Tue, 4 Dec 2018 15:22:26 +0000 (16:22 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 6 Dec 2018 15:50:43 +0000 (10:50 -0500)
commitbae12c6b74c5c216e25e9fc5cf655ad3060be558
tree3ace0108a401c0678ccc378a505e7b8eeb77efa5
parent3f36551ba34279691dc4819de1c70f095300b150
Add precision error margin to cos() tests for float_controls

On some old Intel hardware, Mesa doesn't return exactly 1.0 for cos(0).
This change implements the precision error margin for the affected cos() tests,
following Vulkan spec, "Precision and Operation of SPIR-V Instructions".

Components: Vulkan

Affects: dEQP-VK.spirv_assembly.instruction.*.float_controls.*.cos_denorm_flush_to_zero*

VK-GL-CTS issue: 1498

Change-Id: I2ff07616f706d4214517917276aeb26d2d875325
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmFloatControlsTests.cpp