From a26286305356c616b6d0f42a197b0e79e57d17fd Mon Sep 17 00:00:00 2001 From: Nikhil Joshi Date: Thu, 17 Sep 2020 18:51:53 +0530 Subject: [PATCH] Fix some more formatting for RW-image checks Remove unnecessary spaces at various places. Also, fix lengthy lines. --- test_common/harness/kernelHelpers.cpp | 16 ++++++++-------- .../images/kernel_read_write/main.cpp | 5 +++-- .../images/samplerlessReads/test_iterations.cpp | 2 +- .../images/samplerlessReads/test_loops.cpp | 2 +- .../images/samplerlessReads/test_read_1D.cpp | 2 +- .../samplerlessReads/test_read_1D_array.cpp | 2 +- .../samplerlessReads/test_read_2D_array.cpp | 2 +- .../images/samplerlessReads/test_read_3D.cpp | 2 +- 8 files changed, 17 insertions(+), 16 deletions(-) diff --git a/test_common/harness/kernelHelpers.cpp b/test_common/harness/kernelHelpers.cpp index 4d9e2e37..aa721180 100644 --- a/test_common/harness/kernelHelpers.cpp +++ b/test_common/harness/kernelHelpers.cpp @@ -1467,7 +1467,7 @@ int checkFor3DImageSupport( cl_device_id device ) return 0; } -int checkForReadWriteImageSupport( cl_device_id device ) +int checkForReadWriteImageSupport(cl_device_id device) { if (checkForImageSupport(device)) { @@ -1475,15 +1475,15 @@ int checkForReadWriteImageSupport( cl_device_id 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. // Check if they are supported. cl_uint are_rw_images_supported{}; test_error( clGetDeviceInfo(device, CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS, - sizeof(are_rw_images_supported), - &are_rw_images_supported, nullptr), + sizeof(are_rw_images_supported), + &are_rw_images_supported, nullptr), "clGetDeviceInfo failed for CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS\n"); 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. 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; } - // Support for read-write image arguments is required - // for an 2.X device if the device supports images. - + // Support for read-write image arguments is required + // for an 2.X device if the device supports images. + /* So our support is good */ return 0; } diff --git a/test_conformance/images/kernel_read_write/main.cpp b/test_conformance/images/kernel_read_write/main.cpp index 16dedd66..98506934 100644 --- a/test_conformance/images/kernel_read_write/main.cpp +++ b/test_conformance/images/kernel_read_write/main.cpp @@ -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 ) diff --git a/test_conformance/images/samplerlessReads/test_iterations.cpp b/test_conformance/images/samplerlessReads/test_iterations.cpp index c8e65830..c33007f1 100644 --- a/test_conformance/images/samplerlessReads/test_iterations.cpp +++ b/test_conformance/images/samplerlessReads/test_iterations.cpp @@ -203,7 +203,7 @@ int test_read_image_set_2D( cl_device_id device, cl_context context, cl_command_ if (gTestReadWrite && checkForReadWriteImageSupport(device)) { - return TEST_SKIPPED_ITSELF; + return TEST_SKIPPED_ITSELF; } imageInfo.format = format; diff --git a/test_conformance/images/samplerlessReads/test_loops.cpp b/test_conformance/images/samplerlessReads/test_loops.cpp index b10e826b..639efa80 100644 --- a/test_conformance/images/samplerlessReads/test_loops.cpp +++ b/test_conformance/images/samplerlessReads/test_loops.cpp @@ -111,7 +111,7 @@ int test_image_set( cl_device_id device, cl_context context, cl_command_queue qu if (gTestReadWrite && checkForReadWriteImageSupport(device)) { - return TEST_SKIPPED_ITSELF; + return TEST_SKIPPED_ITSELF; } // This flag is only for querying the list of supported formats diff --git a/test_conformance/images/samplerlessReads/test_read_1D.cpp b/test_conformance/images/samplerlessReads/test_read_1D.cpp index 474280b8..f38a2e64 100644 --- a/test_conformance/images/samplerlessReads/test_read_1D.cpp +++ b/test_conformance/images/samplerlessReads/test_read_1D.cpp @@ -198,7 +198,7 @@ int test_read_image_set_1D( cl_device_id device, cl_context context, cl_command_ if (gTestReadWrite && checkForReadWriteImageSupport(device)) { - return TEST_SKIPPED_ITSELF; + return TEST_SKIPPED_ITSELF; } // Get our operating params diff --git a/test_conformance/images/samplerlessReads/test_read_1D_array.cpp b/test_conformance/images/samplerlessReads/test_read_1D_array.cpp index f9054e16..c86250fc 100644 --- a/test_conformance/images/samplerlessReads/test_read_1D_array.cpp +++ b/test_conformance/images/samplerlessReads/test_read_1D_array.cpp @@ -200,7 +200,7 @@ int test_read_image_set_1D_array( cl_device_id device, cl_context context, cl_co if (gTestReadWrite && checkForReadWriteImageSupport(device)) { - return TEST_SKIPPED_ITSELF; + return TEST_SKIPPED_ITSELF; } imageInfo.format = format; diff --git a/test_conformance/images/samplerlessReads/test_read_2D_array.cpp b/test_conformance/images/samplerlessReads/test_read_2D_array.cpp index 5d7af9d1..fe221ee5 100644 --- a/test_conformance/images/samplerlessReads/test_read_2D_array.cpp +++ b/test_conformance/images/samplerlessReads/test_read_2D_array.cpp @@ -178,7 +178,7 @@ int test_read_image_set_2D_array( cl_device_id device, cl_context context, cl_co if (gTestReadWrite && checkForReadWriteImageSupport(device)) { - return TEST_SKIPPED_ITSELF; + return TEST_SKIPPED_ITSELF; } clProgramWrapper program; diff --git a/test_conformance/images/samplerlessReads/test_read_3D.cpp b/test_conformance/images/samplerlessReads/test_read_3D.cpp index 370f2289..e06a347c 100644 --- a/test_conformance/images/samplerlessReads/test_read_3D.cpp +++ b/test_conformance/images/samplerlessReads/test_read_3D.cpp @@ -181,7 +181,7 @@ int test_read_image_set_3D( cl_device_id device, cl_context context, cl_command_ if (gTestReadWrite && checkForReadWriteImageSupport(device)) { - return TEST_SKIPPED_ITSELF; + return TEST_SKIPPED_ITSELF; } clProgramWrapper program;