mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-25 16:29:03 +00:00
Fix formatting in case of Read-Write image checks.
Fix formatting in case of Read-write image checks. Also, combine two ifs into one in case of kerne_read_write tests
This commit is contained in:
@@ -1487,8 +1487,8 @@ int checkForReadWriteImageSupport( cl_device_id device )
|
|||||||
"clGetDeviceInfo failed for CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS\n");
|
"clGetDeviceInfo failed for CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS\n");
|
||||||
if (0 == are_rw_images_supported)
|
if (0 == are_rw_images_supported)
|
||||||
{
|
{
|
||||||
log_info("READ_WRITE_IMAGE tests skipped, not supported.\n");
|
log_info("READ_WRITE_IMAGE tests skipped, not supported.\n");
|
||||||
return CL_IMAGE_FORMAT_NOT_SUPPORTED;
|
return CL_IMAGE_FORMAT_NOT_SUPPORTED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// READ_WRITE images are not supported on 1.X devices.
|
// READ_WRITE images are not supported on 1.X devices.
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ extern test_status verifyImageSupport( cl_device_id device );
|
|||||||
/* Checks that the given device supports images. Same as verify, but doesn't print an error */
|
/* Checks that the given device supports images. Same as verify, but doesn't print an error */
|
||||||
extern int checkForImageSupport( cl_device_id device );
|
extern int checkForImageSupport( cl_device_id device );
|
||||||
extern int checkFor3DImageSupport( cl_device_id device );
|
extern int checkFor3DImageSupport( cl_device_id device );
|
||||||
extern int checkForReadWriteImageSupport( cl_device_id device );
|
extern int checkForReadWriteImageSupport(cl_device_id device);
|
||||||
|
|
||||||
/* Checks that a given queue property is supported on the specified device. Returns 1 if supported, 0 if not or an error. */
|
/* Checks that a given queue property is supported on the specified device. Returns 1 if supported, 0 if not or an error. */
|
||||||
extern int checkDeviceForQueueSupport( cl_device_id device, cl_command_queue_properties prop );
|
extern int checkDeviceForQueueSupport( cl_device_id device, cl_command_queue_properties prop );
|
||||||
|
|||||||
@@ -177,12 +177,9 @@ static int doTest( cl_device_id device, cl_context context, cl_command_queue que
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (testTypesToRun & kReadWriteTests)
|
if ((testTypesToRun & kReadWriteTests) && checkForReadWriteImageSupport(device))
|
||||||
{
|
{
|
||||||
if(checkForReadWriteImageSupport(device))
|
return TEST_SKIPPED_ITSELF;
|
||||||
{
|
|
||||||
return TEST_SKIPPED_ITSELF;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ( testTypesToRun & kReadWriteTests ) && !gTestMipmaps )
|
if( ( testTypesToRun & kReadWriteTests ) && !gTestMipmaps )
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ int test_read_image_set_2D( cl_device_id device, cl_context context, cl_command_
|
|||||||
image_descriptor imageInfo = { 0 };
|
image_descriptor imageInfo = { 0 };
|
||||||
size_t pixelSize;
|
size_t pixelSize;
|
||||||
|
|
||||||
if(gTestReadWrite && checkForReadWriteImageSupport(device))
|
if (gTestReadWrite && checkForReadWriteImageSupport(device))
|
||||||
{
|
{
|
||||||
return TEST_SKIPPED_ITSELF;
|
return TEST_SKIPPED_ITSELF;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ int test_image_set( cl_device_id device, cl_context context, cl_command_queue qu
|
|||||||
gDeviceLt20 = true;
|
gDeviceLt20 = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(gTestReadWrite && checkForReadWriteImageSupport(device))
|
if (gTestReadWrite && checkForReadWriteImageSupport(device))
|
||||||
{
|
{
|
||||||
return TEST_SKIPPED_ITSELF;
|
return TEST_SKIPPED_ITSELF;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ int test_read_image_set_1D( cl_device_id device, cl_context context, cl_command_
|
|||||||
RandomSeed seed( gRandomSeed );
|
RandomSeed seed( gRandomSeed );
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
if(gTestReadWrite && checkForReadWriteImageSupport(device))
|
if (gTestReadWrite && checkForReadWriteImageSupport(device))
|
||||||
{
|
{
|
||||||
return TEST_SKIPPED_ITSELF;
|
return TEST_SKIPPED_ITSELF;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ int test_read_image_set_1D_array( cl_device_id device, cl_context context, cl_co
|
|||||||
image_descriptor imageInfo = { 0 };
|
image_descriptor imageInfo = { 0 };
|
||||||
size_t pixelSize;
|
size_t pixelSize;
|
||||||
|
|
||||||
if(gTestReadWrite && checkForReadWriteImageSupport(device))
|
if (gTestReadWrite && checkForReadWriteImageSupport(device))
|
||||||
{
|
{
|
||||||
return TEST_SKIPPED_ITSELF;
|
return TEST_SKIPPED_ITSELF;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ int test_read_image_set_2D_array( cl_device_id device, cl_context context, cl_co
|
|||||||
|
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
if(gTestReadWrite && checkForReadWriteImageSupport(device))
|
if (gTestReadWrite && checkForReadWriteImageSupport(device))
|
||||||
{
|
{
|
||||||
return TEST_SKIPPED_ITSELF;
|
return TEST_SKIPPED_ITSELF;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ int test_read_image_set_3D( cl_device_id device, cl_context context, cl_command_
|
|||||||
|
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
if(gTestReadWrite && checkForReadWriteImageSupport(device))
|
if (gTestReadWrite && checkForReadWriteImageSupport(device))
|
||||||
{
|
{
|
||||||
return TEST_SKIPPED_ITSELF;
|
return TEST_SKIPPED_ITSELF;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user