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
This commit is contained in:
Romaric Jodin
2022-04-28 23:46:52 +02:00
committed by GitHub
parent 13d1b01f65
commit 35c21a8e06

View File

@@ -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;
}
}