mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-20 22:39:03 +00:00
cl21: Reuse test harness code in kernel_image_methods (#210)
Some of the setup functionality is already there in the test harness, so use that and remove the duplicated code from within the suite. Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
This commit is contained in:
committed by
Kévin Petit
parent
0c45098fd4
commit
a28cfca522
@@ -20,9 +20,9 @@
|
||||
|
||||
extern bool gDebugTrace, gTestSmallImages, gTestMaxImages;
|
||||
|
||||
extern int test_get_image_info_single( cl_device_id device, image_descriptor *imageInfo, MTdata d );
|
||||
extern int test_get_image_info_single( cl_context context, cl_command_queue queue, image_descriptor *imageInfo, MTdata d );
|
||||
|
||||
int test_get_image_info_3D( cl_device_id device, cl_image_format *format )
|
||||
int test_get_image_info_3D( cl_device_id device, cl_context context, cl_command_queue queue, cl_image_format *format )
|
||||
{
|
||||
size_t maxWidth, maxHeight, maxDepth;
|
||||
cl_ulong maxAllocSize, memSize;
|
||||
@@ -58,7 +58,7 @@ int test_get_image_info_3D( cl_device_id device, cl_image_format *format )
|
||||
{
|
||||
if( gDebugTrace )
|
||||
log_info( " at size %d,%d,%d\n", (int)imageInfo.width, (int)imageInfo.height, (int)imageInfo.depth );
|
||||
int ret = test_get_image_info_single( device, &imageInfo, seed );
|
||||
int ret = test_get_image_info_single( context, queue, &imageInfo, seed );
|
||||
if( ret )
|
||||
return -1;
|
||||
}
|
||||
@@ -84,7 +84,7 @@ int test_get_image_info_3D( cl_device_id device, cl_image_format *format )
|
||||
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 ] );
|
||||
if( test_get_image_info_single( device, &imageInfo, seed ) )
|
||||
if( test_get_image_info_single( context, queue, &imageInfo, seed ) )
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -120,7 +120,7 @@ int test_get_image_info_3D( cl_device_id device, cl_image_format *format )
|
||||
|
||||
if( gDebugTrace )
|
||||
log_info( " at size %d,%d,%d (pitch %d,%d) out of %d,%d,%d\n", (int)imageInfo.width, (int)imageInfo.height, (int)imageInfo.depth, (int)imageInfo.rowPitch, (int)imageInfo.slicePitch, (int)maxWidth, (int)maxHeight, (int)maxDepth );
|
||||
int ret = test_get_image_info_single( device, &imageInfo, seed );
|
||||
int ret = test_get_image_info_single( context, queue, &imageInfo, seed );
|
||||
if( ret )
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user