diff --git a/test_common/harness/kernelHelpers.cpp b/test_common/harness/kernelHelpers.cpp index bcf5a195..4d9e2e37 100644 --- a/test_common/harness/kernelHelpers.cpp +++ b/test_common/harness/kernelHelpers.cpp @@ -1469,7 +1469,7 @@ int checkFor3DImageSupport( cl_device_id device ) int checkForReadWriteImageSupport( cl_device_id device ) { - if (checkForImageSupport(device)) + if (checkForImageSupport(device)) { return CL_IMAGE_FORMAT_NOT_SUPPORTED; } @@ -1485,10 +1485,10 @@ int checkForReadWriteImageSupport( cl_device_id device ) 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) + if (0 == are_rw_images_supported) { - log_info("READ_WRITE_IMAGE tests skipped, not supported.\n"); - return CL_IMAGE_FORMAT_NOT_SUPPORTED; + log_info("READ_WRITE_IMAGE tests skipped, not supported.\n"); + return CL_IMAGE_FORMAT_NOT_SUPPORTED; } } // READ_WRITE images are not supported on 1.X devices. diff --git a/test_common/harness/kernelHelpers.h b/test_common/harness/kernelHelpers.h index 15690f1e..eecc8f02 100644 --- a/test_common/harness/kernelHelpers.h +++ b/test_common/harness/kernelHelpers.h @@ -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 */ extern int checkForImageSupport( 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. */ extern int checkDeviceForQueueSupport( cl_device_id device, cl_command_queue_properties prop ); diff --git a/test_conformance/images/kernel_read_write/main.cpp b/test_conformance/images/kernel_read_write/main.cpp index 8ed0743c..16dedd66 100644 --- a/test_conformance/images/kernel_read_write/main.cpp +++ b/test_conformance/images/kernel_read_write/main.cpp @@ -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 ) diff --git a/test_conformance/images/samplerlessReads/test_iterations.cpp b/test_conformance/images/samplerlessReads/test_iterations.cpp index 37fcffef..c8e65830 100644 --- a/test_conformance/images/samplerlessReads/test_iterations.cpp +++ b/test_conformance/images/samplerlessReads/test_iterations.cpp @@ -201,7 +201,7 @@ int test_read_image_set_2D( cl_device_id device, cl_context context, cl_command_ image_descriptor imageInfo = { 0 }; size_t pixelSize; - if(gTestReadWrite && checkForReadWriteImageSupport(device)) + if (gTestReadWrite && checkForReadWriteImageSupport(device)) { return TEST_SKIPPED_ITSELF; } diff --git a/test_conformance/images/samplerlessReads/test_loops.cpp b/test_conformance/images/samplerlessReads/test_loops.cpp index e2629013..b10e826b 100644 --- a/test_conformance/images/samplerlessReads/test_loops.cpp +++ b/test_conformance/images/samplerlessReads/test_loops.cpp @@ -109,7 +109,7 @@ int test_image_set( cl_device_id device, cl_context context, cl_command_queue qu gDeviceLt20 = true; } - if(gTestReadWrite && checkForReadWriteImageSupport(device)) + if (gTestReadWrite && checkForReadWriteImageSupport(device)) { return TEST_SKIPPED_ITSELF; } diff --git a/test_conformance/images/samplerlessReads/test_read_1D.cpp b/test_conformance/images/samplerlessReads/test_read_1D.cpp index 3d075063..474280b8 100644 --- a/test_conformance/images/samplerlessReads/test_read_1D.cpp +++ b/test_conformance/images/samplerlessReads/test_read_1D.cpp @@ -196,7 +196,7 @@ int test_read_image_set_1D( cl_device_id device, cl_context context, cl_command_ RandomSeed seed( gRandomSeed ); int error; - if(gTestReadWrite && checkForReadWriteImageSupport(device)) + if (gTestReadWrite && checkForReadWriteImageSupport(device)) { return TEST_SKIPPED_ITSELF; } diff --git a/test_conformance/images/samplerlessReads/test_read_1D_array.cpp b/test_conformance/images/samplerlessReads/test_read_1D_array.cpp index d45d756a..f9054e16 100644 --- a/test_conformance/images/samplerlessReads/test_read_1D_array.cpp +++ b/test_conformance/images/samplerlessReads/test_read_1D_array.cpp @@ -198,7 +198,7 @@ int test_read_image_set_1D_array( cl_device_id device, cl_context context, cl_co image_descriptor imageInfo = { 0 }; size_t pixelSize; - if(gTestReadWrite && checkForReadWriteImageSupport(device)) + if (gTestReadWrite && checkForReadWriteImageSupport(device)) { return TEST_SKIPPED_ITSELF; } diff --git a/test_conformance/images/samplerlessReads/test_read_2D_array.cpp b/test_conformance/images/samplerlessReads/test_read_2D_array.cpp index 7684db54..5d7af9d1 100644 --- a/test_conformance/images/samplerlessReads/test_read_2D_array.cpp +++ b/test_conformance/images/samplerlessReads/test_read_2D_array.cpp @@ -176,7 +176,7 @@ int test_read_image_set_2D_array( cl_device_id device, cl_context context, cl_co int error; - if(gTestReadWrite && checkForReadWriteImageSupport(device)) + if (gTestReadWrite && checkForReadWriteImageSupport(device)) { return TEST_SKIPPED_ITSELF; } diff --git a/test_conformance/images/samplerlessReads/test_read_3D.cpp b/test_conformance/images/samplerlessReads/test_read_3D.cpp index 59721d5d..370f2289 100644 --- a/test_conformance/images/samplerlessReads/test_read_3D.cpp +++ b/test_conformance/images/samplerlessReads/test_read_3D.cpp @@ -179,7 +179,7 @@ int test_read_image_set_3D( cl_device_id device, cl_context context, cl_command_ int error; - if(gTestReadWrite && checkForReadWriteImageSupport(device)) + if (gTestReadWrite && checkForReadWriteImageSupport(device)) { return TEST_SKIPPED_ITSELF; }