Avoid hitting fp16 NaN values
authorPiers Daniell <pdaniell@nvidia.com>
Wed, 18 Oct 2017 17:01:13 +0000 (11:01 -0600)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 12 Jan 2018 12:55:05 +0000 (07:55 -0500)
Modify the test references values to avoid situations where
they hit NaN values when viewed as fp16. This can happen
when uploading {0.1, 0.5, 0.9, 0.2} to r8g8b8a8_unorm which,
depending on the rounding of the 0.5, could end up as a 0x7F
value which when viewed as the MSB of a fp16 value is a NaN.

Affects:

dEQP-VK.image.mutable.*

Components: Vulkan

VK-GL-CTS Issue: 784

Change-Id: I2adbd27aa7d94254c9f19d788eacace2ea95d10c
(cherry picked from commit d51c248f04b980406d9b767064170b77b682cac7)

external/vulkancts/modules/vulkan/image/vktImageMutableTests.cpp

index 03aa773..61d8443 100644 (file)
@@ -109,7 +109,7 @@ static const deUint32 COLOR_TABLE_SIZE = 4;
 static const Vec4      COLOR_TABLE_FLOAT[COLOR_TABLE_SIZE]     =
 {
        Vec4(0.00f, 0.40f, 0.80f, 0.10f),
-       Vec4(0.10f, 0.50f, 0.90f, 0.20f),
+       Vec4(0.50f, 0.10f, 0.90f, 0.20f),
        Vec4(0.20f, 0.60f, 1.00f, 0.30f),
        Vec4(0.30f, 0.70f, 0.00f, 0.40f),
 };