mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-26 08:49:02 +00:00
Replace OBSOLETE_FORAMT with OBSOLETE_FORMAT (#1776)
* Replace OBSOLETE_FORAMT with OBSOLETE_FORMAT In imageHelpers.cpp and few other places in image tests, OBSOLETE_FORMAT is misspelled as OBSOLETE_FORAMT. Fix misspelling by replcaing it with OBSOLETE_FORMAT. Fixes #1769 * Remove code guarded by OBSOLETE_FORMAT Remove code guarded by OBSOLETE_FORMAT as suggested by review comments Fixes #1769 * Fix formating issues for OBSOLETE_FORMAT changes Fix formatting issues observed in files while removing code guarded by OBSOLETE_FORMAT Fixes #1769 * Some more formatting fixes Some more formatting fixes to get CI clean Fixes #1769 * Final Formating fixes Final formatting fixes for #1769
This commit is contained in:
@@ -97,23 +97,9 @@ uint32_t get_channel_data_type_size(cl_channel_type channelType)
|
|||||||
case CL_UNSIGNED_INT32: return sizeof(cl_int);
|
case CL_UNSIGNED_INT32: return sizeof(cl_int);
|
||||||
|
|
||||||
case CL_UNORM_SHORT_565:
|
case CL_UNORM_SHORT_565:
|
||||||
case CL_UNORM_SHORT_555:
|
case CL_UNORM_SHORT_555: return 2;
|
||||||
#ifdef OBSOLETE_FORAMT
|
|
||||||
case CL_UNORM_SHORT_565_REV:
|
|
||||||
case CL_UNORM_SHORT_555_REV:
|
|
||||||
#endif
|
|
||||||
return 2;
|
|
||||||
|
|
||||||
#ifdef OBSOLETE_FORAMT
|
case CL_UNORM_INT_101010: return 4;
|
||||||
case CL_UNORM_INT_8888:
|
|
||||||
case CL_UNORM_INT_8888_REV: return 4;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
case CL_UNORM_INT_101010:
|
|
||||||
#ifdef OBSOLETE_FORAMT
|
|
||||||
case CL_UNORM_INT_101010_REV:
|
|
||||||
#endif
|
|
||||||
return 4;
|
|
||||||
|
|
||||||
case CL_FLOAT: return sizeof(cl_float);
|
case CL_FLOAT: return sizeof(cl_float);
|
||||||
|
|
||||||
@@ -294,23 +280,9 @@ uint32_t get_pixel_size(const cl_image_format *format)
|
|||||||
return get_format_channel_count(format) * sizeof(cl_int);
|
return get_format_channel_count(format) * sizeof(cl_int);
|
||||||
|
|
||||||
case CL_UNORM_SHORT_565:
|
case CL_UNORM_SHORT_565:
|
||||||
case CL_UNORM_SHORT_555:
|
case CL_UNORM_SHORT_555: return 2;
|
||||||
#ifdef OBSOLETE_FORAMT
|
|
||||||
case CL_UNORM_SHORT_565_REV:
|
|
||||||
case CL_UNORM_SHORT_555_REV:
|
|
||||||
#endif
|
|
||||||
return 2;
|
|
||||||
|
|
||||||
#ifdef OBSOLETE_FORAMT
|
case CL_UNORM_INT_101010: return 4;
|
||||||
case CL_UNORM_INT_8888:
|
|
||||||
case CL_UNORM_INT_8888_REV: return 4;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
case CL_UNORM_INT_101010:
|
|
||||||
#ifdef OBSOLETE_FORAMT
|
|
||||||
case CL_UNORM_INT_101010_REV:
|
|
||||||
#endif
|
|
||||||
return 4;
|
|
||||||
|
|
||||||
case CL_FLOAT:
|
case CL_FLOAT:
|
||||||
return get_format_channel_count(format) * sizeof(cl_float);
|
return get_format_channel_count(format) * sizeof(cl_float);
|
||||||
|
|||||||
@@ -347,48 +347,6 @@ void read_image_pixel(void *imageData, image_descriptor *imageInfo, int x,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef OBSOLETE_FORMAT
|
|
||||||
case CL_UNORM_SHORT_565_REV: {
|
|
||||||
unsigned short *dPtr = (unsigned short *)ptr;
|
|
||||||
tempData[2] = (T)(dPtr[0] >> 11);
|
|
||||||
tempData[1] = (T)((dPtr[0] >> 5) & 63);
|
|
||||||
tempData[0] = (T)(dPtr[0] & 31);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case CL_UNORM_SHORT_555_REV: {
|
|
||||||
unsigned short *dPtr = (unsigned short *)ptr;
|
|
||||||
tempData[2] = (T)((dPtr[0] >> 10) & 31);
|
|
||||||
tempData[1] = (T)((dPtr[0] >> 5) & 31);
|
|
||||||
tempData[0] = (T)(dPtr[0] & 31);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case CL_UNORM_INT_8888: {
|
|
||||||
unsigned int *dPtr = (unsigned int *)ptr;
|
|
||||||
tempData[3] = (T)(dPtr[0] >> 24);
|
|
||||||
tempData[2] = (T)((dPtr[0] >> 16) & 0xff);
|
|
||||||
tempData[1] = (T)((dPtr[0] >> 8) & 0xff);
|
|
||||||
tempData[0] = (T)(dPtr[0] & 0xff);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case CL_UNORM_INT_8888_REV: {
|
|
||||||
unsigned int *dPtr = (unsigned int *)ptr;
|
|
||||||
tempData[0] = (T)(dPtr[0] >> 24);
|
|
||||||
tempData[1] = (T)((dPtr[0] >> 16) & 0xff);
|
|
||||||
tempData[2] = (T)((dPtr[0] >> 8) & 0xff);
|
|
||||||
tempData[3] = (T)(dPtr[0] & 0xff);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case CL_UNORM_INT_101010_REV: {
|
|
||||||
unsigned int *dPtr = (unsigned int *)ptr;
|
|
||||||
tempData[2] = (T)((dPtr[0] >> 20) & 0x3ff);
|
|
||||||
tempData[1] = (T)((dPtr[0] >> 10) & 0x3ff);
|
|
||||||
tempData[0] = (T)(dPtr[0] & 0x3ff);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
case CL_UNORM_SHORT_555: {
|
case CL_UNORM_SHORT_555: {
|
||||||
cl_ushort *dPtr = (cl_ushort *)ptr;
|
cl_ushort *dPtr = (cl_ushort *)ptr;
|
||||||
tempData[0] = (T)((dPtr[0] >> 10) & 31);
|
tempData[0] = (T)((dPtr[0] >> 10) & 31);
|
||||||
|
|||||||
@@ -16,26 +16,12 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
cl_channel_type floatFormats[] = {
|
cl_channel_type floatFormats[] = {
|
||||||
CL_UNORM_SHORT_565,
|
CL_UNORM_SHORT_565, CL_UNORM_SHORT_555, CL_UNORM_INT_101010,
|
||||||
CL_UNORM_SHORT_555,
|
|
||||||
CL_UNORM_INT_101010,
|
|
||||||
#ifdef OBSOLETE_FORAMT
|
|
||||||
CL_UNORM_SHORT_565_REV,
|
|
||||||
CL_UNORM_SHORT_555_REV,
|
|
||||||
CL_UNORM_INT_8888,
|
|
||||||
CL_UNORM_INT_8888_REV,
|
|
||||||
CL_UNORM_INT_101010_REV,
|
|
||||||
#endif
|
|
||||||
#ifdef CL_SFIXED14_APPLE
|
#ifdef CL_SFIXED14_APPLE
|
||||||
CL_SFIXED14_APPLE,
|
CL_SFIXED14_APPLE,
|
||||||
#endif
|
#endif
|
||||||
CL_UNORM_INT8,
|
CL_UNORM_INT8, CL_SNORM_INT8, CL_UNORM_INT16, CL_SNORM_INT16,
|
||||||
CL_SNORM_INT8,
|
CL_FLOAT, CL_HALF_FLOAT, (cl_channel_type)-1,
|
||||||
CL_UNORM_INT16,
|
|
||||||
CL_SNORM_INT16,
|
|
||||||
CL_FLOAT,
|
|
||||||
CL_HALF_FLOAT,
|
|
||||||
(cl_channel_type)-1,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
cl_channel_type intFormats[] = {
|
cl_channel_type intFormats[] = {
|
||||||
|
|||||||
Reference in New Issue
Block a user