mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-24 15:59:03 +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:
@@ -152,9 +152,27 @@ int test_fill_image_set_2D_array( cl_device_id device, cl_image_format *format,
|
||||
|
||||
imageInfo.slicePitch = imageInfo.rowPitch * (imageInfo.height + slicePadding);
|
||||
|
||||
log_info( "Testing %d x %d x %d\n", (int)sizes[ idx ][ 0 ], (int)sizes[ idx ][ 1 ], (int)sizes[ idx ][ 2 ] );
|
||||
if ( gDebugTrace )
|
||||
log_info( " at max size %d,%d,%d\n", (int)sizes[ idx ][ 0 ], (int)sizes[ idx ][ 1 ], (int)sizes[ idx ][ 2 ] );
|
||||
// Loop until we get a size that a) will fit in the max alloc size and b) that an allocation of that
|
||||
// image, the result array, plus offset arrays, will fit in the global ram space
|
||||
cl_ulong size = (cl_ulong)imageInfo.slicePitch * (cl_ulong)imageInfo.arraySize * 4 * 4;
|
||||
|
||||
while (size > maxAllocSize || (size * 3) > memSize) {
|
||||
if (imageInfo.arraySize == 1) {
|
||||
// arraySize cannot be 0.
|
||||
break;
|
||||
}
|
||||
imageInfo.arraySize--;
|
||||
size = (cl_ulong)imageInfo.slicePitch * (cl_ulong)imageInfo.arraySize * 4 * 4;
|
||||
}
|
||||
|
||||
while (size > maxAllocSize || (size * 3) > memSize) {
|
||||
imageInfo.height--;
|
||||
imageInfo.slicePitch = imageInfo.height * imageInfo.rowPitch;
|
||||
size = (cl_ulong)imageInfo.slicePitch * (cl_ulong)imageInfo.arraySize * 4 * 4;
|
||||
}
|
||||
|
||||
log_info( "Testing %d x %d x %d\n", (int)imageInfo.width, (int)imageInfo.height, (int)imageInfo.arraySize);
|
||||
|
||||
if ( test_fill_image_2D_array( device, &imageInfo, outputType, seed ) )
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -57,11 +57,11 @@ int test_3D(cl_device_id deviceID, cl_context context, cl_command_queue queue, i
|
||||
|
||||
return test_image_set( device, CL_MEM_OBJECT_IMAGE3D );
|
||||
}
|
||||
int test_1DArray(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
int test_1Darray(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
{
|
||||
return test_image_set( device, CL_MEM_OBJECT_IMAGE1D_ARRAY );
|
||||
}
|
||||
int test_2DArray(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
int test_2Darray(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
{
|
||||
return test_image_set( device, CL_MEM_OBJECT_IMAGE2D_ARRAY );
|
||||
}
|
||||
@@ -70,16 +70,16 @@ basefn basefn_list[] = {
|
||||
test_1D,
|
||||
test_2D,
|
||||
test_3D,
|
||||
test_1DArray,
|
||||
test_2DArray,
|
||||
test_1Darray,
|
||||
test_2Darray,
|
||||
};
|
||||
|
||||
const char *basefn_names[] = {
|
||||
"1D",
|
||||
"2D",
|
||||
"3D",
|
||||
"1DArray",
|
||||
"2DArray",
|
||||
"1Darray",
|
||||
"2Darray",
|
||||
};
|
||||
|
||||
ct_assert((sizeof(basefn_names) / sizeof(basefn_names[0])) == (sizeof(basefn_list) / sizeof(basefn_list[0])));
|
||||
|
||||
@@ -52,11 +52,11 @@ int test_3D(cl_device_id deviceID, cl_context context, cl_command_queue queue, i
|
||||
{
|
||||
return test_image_set( device, CL_MEM_OBJECT_IMAGE3D );
|
||||
}
|
||||
int test_1DArray(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
int test_1Darray(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
{
|
||||
return test_image_set( device, CL_MEM_OBJECT_IMAGE1D_ARRAY );
|
||||
}
|
||||
int test_2DArray(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
int test_2Darray(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
{
|
||||
return test_image_set( device, CL_MEM_OBJECT_IMAGE2D_ARRAY );
|
||||
}
|
||||
@@ -65,16 +65,16 @@ basefn basefn_list[] = {
|
||||
test_1D,
|
||||
test_2D,
|
||||
test_3D,
|
||||
test_1DArray,
|
||||
test_2DArray,
|
||||
test_1Darray,
|
||||
test_2Darray,
|
||||
};
|
||||
|
||||
const char *basefn_names[] = {
|
||||
"1D",
|
||||
"2D",
|
||||
"3D",
|
||||
"1DArray",
|
||||
"2DArray",
|
||||
"1Darray",
|
||||
"2Darray",
|
||||
};
|
||||
|
||||
ct_assert((sizeof(basefn_names) / sizeof(basefn_names[0])) == (sizeof(basefn_list) / sizeof(basefn_list[0])));
|
||||
|
||||
@@ -52,11 +52,11 @@ int test_3D(cl_device_id deviceID, cl_context context, cl_command_queue queue, i
|
||||
{
|
||||
return test_image_set( device, CL_MEM_OBJECT_IMAGE3D );
|
||||
}
|
||||
int test_1DArray(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
int test_1Darray(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
{
|
||||
return test_image_set( device, CL_MEM_OBJECT_IMAGE1D_ARRAY );
|
||||
}
|
||||
int test_2DArray(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
int test_2Darray(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
{
|
||||
return test_image_set( device, CL_MEM_OBJECT_IMAGE2D_ARRAY );
|
||||
}
|
||||
@@ -65,16 +65,16 @@ basefn basefn_list[] = {
|
||||
test_1D,
|
||||
test_2D,
|
||||
test_3D,
|
||||
test_1DArray,
|
||||
test_2DArray,
|
||||
test_1Darray,
|
||||
test_2Darray,
|
||||
};
|
||||
|
||||
const char *basefn_names[] = {
|
||||
"1D",
|
||||
"2D",
|
||||
"3D",
|
||||
"1DArray",
|
||||
"2DArray",
|
||||
"1Darray",
|
||||
"2Darray",
|
||||
};
|
||||
|
||||
ct_assert((sizeof(basefn_names) / sizeof(basefn_names[0])) == (sizeof(basefn_list) / sizeof(basefn_list[0])));
|
||||
|
||||
@@ -65,11 +65,11 @@ int test_3D(cl_device_id deviceID, cl_context context, cl_command_queue queue, i
|
||||
{
|
||||
return test_image_set( device, CL_MEM_OBJECT_IMAGE3D );
|
||||
}
|
||||
int test_1DArray(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
int test_1Darray(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
{
|
||||
return test_image_set( device, CL_MEM_OBJECT_IMAGE1D_ARRAY );
|
||||
}
|
||||
int test_2DArray(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
int test_2Darray(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
|
||||
{
|
||||
return test_image_set( device, CL_MEM_OBJECT_IMAGE2D_ARRAY );
|
||||
}
|
||||
@@ -78,16 +78,16 @@ basefn basefn_list[] = {
|
||||
test_1D,
|
||||
test_2D,
|
||||
test_3D,
|
||||
test_1DArray,
|
||||
test_2DArray,
|
||||
test_1Darray,
|
||||
test_2Darray,
|
||||
};
|
||||
|
||||
const char *basefn_names[] = {
|
||||
"1D",
|
||||
"2D",
|
||||
"3D",
|
||||
"1DArray",
|
||||
"2DArray",
|
||||
"1Darray",
|
||||
"2Darray",
|
||||
};
|
||||
|
||||
ct_assert((sizeof(basefn_names) / sizeof(basefn_names[0])) == (sizeof(basefn_list) / sizeof(basefn_list[0])));
|
||||
|
||||
Reference in New Issue
Block a user