Correctly handle normalized formats in FloatFormat
authorJames Fitzpatrick <james.fitzpatrick@imgtec.com>
Mon, 20 Jan 2020 09:02:24 +0000 (09:02 +0000)
committerJames Fitzpatrick <james.fitzpatrick@imgtec.com>
Fri, 21 Feb 2020 10:00:24 +0000 (10:00 +0000)
commitad89e118084d08fa1f14ad5801b996c62eb113cc
treeda87c90a61fcdfd86864fb73cfec20bd5a550035
parentb31fd0f86509e35d3bd4cba4d72d8dee139d55d3
Correctly handle normalized formats in FloatFormat

For the texture explict lod tests normalized values were treated as 8
bit floating point formats when calculating the reference interval.
This ignores the fact that normalized formats are encoded as 1 / N,
where N is an integer, this results in the rounding used in tests not
being able to accurately round normalized formats.

This incorrect rounding causes the acceptable ranges to be
significantly smaller than other formats and extremely asymetric
around the ideal filtered value for certain samples.

Affects: dEQP-VK.texture.explicit_lod.*

Components: Vulkan

VK-GL-CTS issue: 2189

Change-Id: Ia4f3adefab4bfb5d9c91bd7033199b0e107179d5
external/vulkancts/modules/vulkan/texture/vktSampleVerifier.cpp
external/vulkancts/modules/vulkan/texture/vktSampleVerifier.hpp
external/vulkancts/modules/vulkan/texture/vktSampleVerifierUtil.cpp
external/vulkancts/modules/vulkan/texture/vktSampleVerifierUtil.hpp
external/vulkancts/modules/vulkan/texture/vktTextureFilteringExplicitLodTests.cpp
framework/common/tcuFloatFormat.cpp
framework/common/tcuFloatFormat.hpp