Fix some more formatting for RW-image checks

Remove unnecessary spaces at various places.
Also, fix lengthy lines.
This commit is contained in:
Nikhil Joshi
2020-09-17 18:51:53 +05:30
parent 0038a98f64
commit a262863053
8 changed files with 17 additions and 16 deletions

View File

@@ -1467,7 +1467,7 @@ int checkFor3DImageSupport( cl_device_id device )
return 0; return 0;
} }
int checkForReadWriteImageSupport( cl_device_id device ) int checkForReadWriteImageSupport(cl_device_id device)
{ {
if (checkForImageSupport(device)) if (checkForImageSupport(device))
{ {
@@ -1475,15 +1475,15 @@ int checkForReadWriteImageSupport( cl_device_id device )
} }
auto device_cl_version = get_device_cl_version(device); auto device_cl_version = get_device_cl_version(device);
if (device_cl_version >= Version(3, 0)) if (device_cl_version >= Version(3, 0))
{ {
// In OpenCL 3.0, Read-Write images are optional. // In OpenCL 3.0, Read-Write images are optional.
// Check if they are supported. // Check if they are supported.
cl_uint are_rw_images_supported{}; cl_uint are_rw_images_supported{};
test_error( test_error(
clGetDeviceInfo(device, CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS, clGetDeviceInfo(device, CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS,
sizeof(are_rw_images_supported), sizeof(are_rw_images_supported),
&are_rw_images_supported, nullptr), &are_rw_images_supported, nullptr),
"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)
{ {
@@ -1494,12 +1494,12 @@ int checkForReadWriteImageSupport( cl_device_id device )
// READ_WRITE images are not supported on 1.X devices. // READ_WRITE images are not supported on 1.X devices.
else if (device_cl_version < Version(2, 0)) else if (device_cl_version < Version(2, 0))
{ {
log_info("READ_WRITE_IMAGE tests skipped, Opencl 2.0 + requried for this test"); log_info("READ_WRITE_IMAGE tests skipped, Opencl 2.0+ is requried.");
return CL_IMAGE_FORMAT_NOT_SUPPORTED; return CL_IMAGE_FORMAT_NOT_SUPPORTED;
} }
// Support for read-write image arguments is required // Support for read-write image arguments is required
// for an 2.X device if the device supports images. // for an 2.X device if the device supports images.
/* So our support is good */ /* So our support is good */
return 0; return 0;
} }

View File

@@ -177,9 +177,10 @@ static int doTest( cl_device_id device, cl_context context, cl_command_queue que
} }
} }
if ((testTypesToRun & kReadWriteTests) && checkForReadWriteImageSupport(device)) if ((testTypesToRun & kReadWriteTests)
&& checkForReadWriteImageSupport(device))
{ {
return TEST_SKIPPED_ITSELF; return TEST_SKIPPED_ITSELF;
} }
if( ( testTypesToRun & kReadWriteTests ) && !gTestMipmaps ) if( ( testTypesToRun & kReadWriteTests ) && !gTestMipmaps )

View File

@@ -203,7 +203,7 @@ int test_read_image_set_2D( cl_device_id device, cl_context context, cl_command_
if (gTestReadWrite && checkForReadWriteImageSupport(device)) if (gTestReadWrite && checkForReadWriteImageSupport(device))
{ {
return TEST_SKIPPED_ITSELF; return TEST_SKIPPED_ITSELF;
} }
imageInfo.format = format; imageInfo.format = format;

View File

@@ -111,7 +111,7 @@ int test_image_set( cl_device_id device, cl_context context, cl_command_queue qu
if (gTestReadWrite && checkForReadWriteImageSupport(device)) if (gTestReadWrite && checkForReadWriteImageSupport(device))
{ {
return TEST_SKIPPED_ITSELF; return TEST_SKIPPED_ITSELF;
} }
// This flag is only for querying the list of supported formats // This flag is only for querying the list of supported formats

View File

@@ -198,7 +198,7 @@ int test_read_image_set_1D( cl_device_id device, cl_context context, cl_command_
if (gTestReadWrite && checkForReadWriteImageSupport(device)) if (gTestReadWrite && checkForReadWriteImageSupport(device))
{ {
return TEST_SKIPPED_ITSELF; return TEST_SKIPPED_ITSELF;
} }
// Get our operating params // Get our operating params

View File

@@ -200,7 +200,7 @@ int test_read_image_set_1D_array( cl_device_id device, cl_context context, cl_co
if (gTestReadWrite && checkForReadWriteImageSupport(device)) if (gTestReadWrite && checkForReadWriteImageSupport(device))
{ {
return TEST_SKIPPED_ITSELF; return TEST_SKIPPED_ITSELF;
} }
imageInfo.format = format; imageInfo.format = format;

View File

@@ -178,7 +178,7 @@ int test_read_image_set_2D_array( cl_device_id device, cl_context context, cl_co
if (gTestReadWrite && checkForReadWriteImageSupport(device)) if (gTestReadWrite && checkForReadWriteImageSupport(device))
{ {
return TEST_SKIPPED_ITSELF; return TEST_SKIPPED_ITSELF;
} }
clProgramWrapper program; clProgramWrapper program;

View File

@@ -181,7 +181,7 @@ int test_read_image_set_3D( cl_device_id device, cl_context context, cl_command_
if (gTestReadWrite && checkForReadWriteImageSupport(device)) if (gTestReadWrite && checkForReadWriteImageSupport(device))
{ {
return TEST_SKIPPED_ITSELF; return TEST_SKIPPED_ITSELF;
} }
clProgramWrapper program; clProgramWrapper program;