Update table of required image formats (#427) (#629)

* Update table of required image formats (#427)

This commit updates the table of required image formats. The table is built depending on the profile of the device, the requested image type, and the avaiablitiy of relevent extensions.

* Fixed incorrect argument to memcpy.

* Made image format arrays static.

* Utilised ARRAY_SIZE where appropriate.

* Re-named required image format bools to be more explicit.

* Made sRGBA, CL_UNORM_INT8 a required full format profile.

Misinterpretation of the spec had made this optional.

* check_minimum_supported: switched to using vectors.

* Added CL_sRGB CL_UNORM_INT8 to full profile required formats.

This matches the same channel data type requirement as CL_sRGBA.

* Overload <= and >= for the Version class.

* Correct the condition under which sRGB images are required.

* Correct the required image formats are based on OpenCL version.

The spec says that for different OpenCL versions, different sets of image formats are required.

* Print out the correct OpenCL version when required image format is not found.

* Improved the way in which image formats are added based on profile and version.

* Potential build fix regarding isnan namespace issues.

* Image Helpers: Remove duplicate copies when building required image format vectors.

Also re-ordered a branch to make it clearer.
This commit is contained in:
Jeremy Kemp
2020-03-03 21:39:32 +00:00
committed by GitHub
parent b1059a2c56
commit 4c59bfa32f
4 changed files with 163 additions and 44 deletions

View File

@@ -147,7 +147,7 @@ int test_image_type( cl_device_id device, cl_context context, cl_mem_object_type
log_info("No requirement for 3D write in OpenCL 1.2. Not checking formats.\n");
} else {
log_info("Checking for required OpenCL 1.2 formats.\n");
if (check_minimum_supported( formatList, numFormats, flags ) == false) {
if (check_minimum_supported( formatList, numFormats, flags, image_type, device ) == false) {
ret++;
} else {
log_info("All required formats present.\n");