From 35c21a8e06f94ffd84bdfe0f94a2aa0deb3d1013 Mon Sep 17 00:00:00 2001 From: Romaric Jodin <89833130+rjodinchr@users.noreply.github.com> Date: Thu, 28 Apr 2022 23:46:52 +0200 Subject: [PATCH] imageHelpers: add CL_UNORM_SHORT_{555, 565} in get_max_absolute_error (#1406) * imageHelpers: add CL_UNORM_SHORT_{555, 565} in get_max_absolute_error Working on a device supporting CL_UNORM_SHORT_565 image data type, I noticed that the max absolute error authorized was not the right one for such image data type. Also because of normalization, there is always an absolute error authorized whatever the filtering of the sampler. Ref #1140 * put back if statement on filter_mode --- test_common/harness/imageHelpers.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test_common/harness/imageHelpers.cpp b/test_common/harness/imageHelpers.cpp index c380c1f3..a254c48f 100644 --- a/test_common/harness/imageHelpers.cpp +++ b/test_common/harness/imageHelpers.cpp @@ -924,6 +924,8 @@ float get_max_absolute_error(const cl_image_format *format, #ifdef CL_SFIXED14_APPLE case CL_SFIXED14_APPLE: return 0x1.0p-14f; #endif + case CL_UNORM_SHORT_555: + case CL_UNORM_SHORT_565: return 1.0f / 31.0f; default: return 0.0f; } }