mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Synchronise with Khronos-private Gitlab branch
The maintenance of the conformance tests is moving to Github. This commit contains all the changes that have been done in Gitlab since the first public release of the conformance tests. Signed-off-by: Kevin Petit kevin.petit@arm.com
This commit is contained in:
@@ -479,16 +479,6 @@ struct AddressingTable
|
||||
|
||||
static AddressingTable sAddressingTable;
|
||||
|
||||
bool alpha_is_x(cl_image_format *format){
|
||||
switch (format->image_channel_order) {
|
||||
case CL_RGBx:
|
||||
case CL_sRGBx:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool is_sRGBA_order(cl_channel_order image_channel_order){
|
||||
switch (image_channel_order) {
|
||||
case CL_sRGB:
|
||||
@@ -508,19 +498,21 @@ int has_alpha(cl_image_format *format) {
|
||||
case CL_R:
|
||||
return 0;
|
||||
case CL_A:
|
||||
case CL_Rx:
|
||||
return 1;
|
||||
case CL_Rx:
|
||||
return 0;
|
||||
case CL_RG:
|
||||
return 0;
|
||||
case CL_RA:
|
||||
case CL_RGx:
|
||||
return 1;
|
||||
case CL_RGx:
|
||||
return 0;
|
||||
case CL_RGB:
|
||||
case CL_sRGB:
|
||||
return 0;
|
||||
case CL_RGBx:
|
||||
case CL_sRGBx:
|
||||
return 1;
|
||||
return 0;
|
||||
case CL_RGBA:
|
||||
return 1;
|
||||
case CL_BGRA:
|
||||
@@ -719,13 +711,6 @@ void get_max_sizes(size_t *numberOfSizes, const int maxNumberOfSizes,
|
||||
}
|
||||
}
|
||||
|
||||
int issubnormal(float a)
|
||||
{
|
||||
union { cl_int i; cl_float f; } u;
|
||||
u.f = a;
|
||||
return (u.i & 0x7f800000U) == 0;
|
||||
}
|
||||
|
||||
float get_max_absolute_error( cl_image_format *format, image_sampler_data *sampler) {
|
||||
if (sampler->filter_mode == CL_FILTER_NEAREST)
|
||||
return 0.0f;
|
||||
@@ -790,6 +775,7 @@ float get_max_relative_error( cl_image_format *format, image_sampler_data *sampl
|
||||
{
|
||||
if( sampler->filter_mode != CL_FILTER_NEAREST )
|
||||
{
|
||||
extern cl_device_type gDeviceType;
|
||||
// The maximum
|
||||
if( gDeviceType == CL_DEVICE_TYPE_GPU )
|
||||
maxError += MAKE_HEX_FLOAT(0x1.0p-4f, 0x1L, -4); // Some GPUs ain't so accurate
|
||||
@@ -1419,7 +1405,7 @@ void read_image_pixel_float( void *imageData, image_descriptor *imageInfo,
|
||||
else {
|
||||
outData[ 0 ] = outData[ 1 ] = outData[ 2 ] = outData[ 3 ] = 0;
|
||||
if (!has_alpha(imageInfo->format))
|
||||
outData[3] = alpha_is_x(imageInfo->format) ? 0 : 1;
|
||||
outData[3] = 1;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user