From e306ecd69116ccb4fd131447b1ab4b77b0d07356 Mon Sep 17 00:00:00 2001 From: Kevin Petit Date: Thu, 20 Feb 2020 12:04:07 +0000 Subject: [PATCH] Remove most remaining clCreate*WithProperties calls in tests that run on 1.2 Don't touch interop suites or code only run with options not required for conformance. Signed-off-by: Kevin Petit --- .../allocations/allocation_utils.cpp | 2 +- .../api/test_create_context_from_type.cpp | 2 +- test_conformance/api/test_create_kernels.c | 2 +- test_conformance/api/test_retain.cpp | 4 ++-- test_conformance/basic/test_readimage.c | 9 ++------- test_conformance/buffers/test_buffer_migrate.c | 2 +- test_conformance/buffers/test_image_migrate.c | 12 ++---------- test_conformance/buffers/test_sub_buffers.cpp | 4 ++-- .../events/test_event_dependencies.cpp | 16 ++++++++-------- test_conformance/events/test_waitlists.cpp | 6 +++--- test_conformance/half/cl_utils.c | 4 ++-- .../images/samplerlessReads/test_iterations.cpp | 7 +------ .../images/samplerlessReads/test_read_1D.cpp | 7 +------ .../samplerlessReads/test_read_1D_array.cpp | 7 +------ .../samplerlessReads/test_read_1D_buffer.cpp | 7 +------ .../samplerlessReads/test_read_2D_array.cpp | 7 +------ .../images/samplerlessReads/test_read_3D.cpp | 7 +------ test_conformance/profiling/execute_multipass.c | 9 ++------- test_conformance/spir/run_services.cpp | 2 +- 19 files changed, 34 insertions(+), 82 deletions(-) diff --git a/test_conformance/allocations/allocation_utils.cpp b/test_conformance/allocations/allocation_utils.cpp index 6877c86a..7d6520b0 100644 --- a/test_conformance/allocations/allocation_utils.cpp +++ b/test_conformance/allocations/allocation_utils.cpp @@ -19,7 +19,7 @@ cl_command_queue reset_queue(cl_context context, cl_device_id device_id, cl_comm { log_info("Invalid command queue. Releasing and recreating the command queue.\n"); clReleaseCommandQueue(*queue); - *queue = clCreateCommandQueueWithProperties(context, device_id, 0, error); + *queue = clCreateCommandQueue(context, device_id, 0, error); return *queue; } diff --git a/test_conformance/api/test_create_context_from_type.cpp b/test_conformance/api/test_create_context_from_type.cpp index 760542d3..e9b1e39b 100644 --- a/test_conformance/api/test_create_context_from_type.cpp +++ b/test_conformance/api/test_create_context_from_type.cpp @@ -68,7 +68,7 @@ int test_create_context_from_type(cl_device_id deviceID, cl_context context, cl_ return -1; } - queue_to_test = clCreateCommandQueueWithProperties(context_to_test, deviceID, NULL, &error); + queue_to_test = clCreateCommandQueue(context_to_test, deviceID, NULL, &error); test_error(error, "clCreateCommandQueue failed"); if (queue_to_test == NULL) { log_error("clCreateCommandQueue returned NULL, but error was CL_SUCCESS."); diff --git a/test_conformance/api/test_create_kernels.c b/test_conformance/api/test_create_kernels.c index 0f25f582..59f7f0aa 100644 --- a/test_conformance/api/test_create_kernels.c +++ b/test_conformance/api/test_create_kernels.c @@ -521,7 +521,7 @@ int test_repeated_setup_cleanup(cl_device_id deviceID, cl_context context, cl_co local_context = clCreateContext(NULL, 1, &deviceID, notify_callback, NULL, &error); test_error( error, "clCreateContext failed"); - local_queue = clCreateCommandQueueWithProperties(local_context, deviceID, 0, &error); + local_queue = clCreateCommandQueue(local_context, deviceID, 0, &error); test_error( error, "clCreateCommandQueue failed"); error = create_single_kernel_helper(local_context, &local_program, NULL, 1, &repeate_test_kernel, NULL); diff --git a/test_conformance/api/test_retain.cpp b/test_conformance/api/test_retain.cpp index 384d280e..0fa0ac6b 100644 --- a/test_conformance/api/test_retain.cpp +++ b/test_conformance/api/test_retain.cpp @@ -38,7 +38,7 @@ int test_retain_queue_single(cl_device_id deviceID, cl_context context, cl_comma /* Create a test queue */ - queue = clCreateCommandQueueWithProperties( context, deviceID, 0, &err ); + queue = clCreateCommandQueue( context, deviceID, 0, &err ); test_error( err, "Unable to create command queue to test with" ); /* Test the instance count */ @@ -70,7 +70,7 @@ int test_retain_queue_multiple(cl_device_id deviceID, cl_context context, cl_com /* Create a test program */ - queue = clCreateCommandQueueWithProperties( context, deviceID, 0, &err ); + queue = clCreateCommandQueue( context, deviceID, 0, &err ); test_error( err, "Unable to create command queue to test with" ); /* Increment 9 times, which should bring the count to 10 */ diff --git a/test_conformance/basic/test_readimage.c b/test_conformance/basic/test_readimage.c index 30eb7dbd..57860090 100644 --- a/test_conformance/basic/test_readimage.c +++ b/test_conformance/basic/test_readimage.c @@ -209,13 +209,8 @@ int test_readimage(cl_device_id device, cl_context context, cl_command_queue que if (err) return -1; - cl_sampler_properties properties[] = { - CL_SAMPLER_NORMALIZED_COORDS, CL_FALSE, - CL_SAMPLER_ADDRESSING_MODE, CL_ADDRESS_CLAMP_TO_EDGE, - CL_SAMPLER_FILTER_MODE, CL_FILTER_NEAREST, - 0 }; - cl_sampler sampler = clCreateSamplerWithProperties(context, properties, &err); - test_error(err, "clCreateSamplerWithProperties failed"); + cl_sampler sampler = clCreateSampler(context, CL_FALSE, CL_ADDRESS_CLAMP_TO_EDGE, CL_FILTER_NEAREST, &err); + test_error(err, "clCreateSampler failed"); if(supportsBGRA) { diff --git a/test_conformance/buffers/test_buffer_migrate.c b/test_conformance/buffers/test_buffer_migrate.c index b3766c8e..1ae3f1e1 100644 --- a/test_conformance/buffers/test_buffer_migrate.c +++ b/test_conformance/buffers/test_buffer_migrate.c @@ -203,7 +203,7 @@ int test_buffer_migrate(cl_device_id deviceID, cl_context context, cl_command_qu // Create a command queue for each sub-device for (i=0; i threads[1] ) localThreads[1] = threads[1]; - cl_sampler_properties properties[] = { - CL_SAMPLER_NORMALIZED_COORDS, CL_FALSE, - CL_SAMPLER_ADDRESSING_MODE, CL_ADDRESS_CLAMP_TO_EDGE, - CL_SAMPLER_FILTER_MODE, CL_FILTER_NEAREST, - 0 }; - cl_sampler sampler = clCreateSamplerWithProperties( context, properties, &err ); + cl_sampler sampler = clCreateSampler( context, CL_FALSE, CL_ADDRESS_CLAMP_TO_EDGE, CL_FILTER_NEAREST, &err ); if( err ){ - log_error( " clCreateSamplerWithProperties failed.\n" ); + log_error( " clCreateSampler failed.\n" ); return -1; } diff --git a/test_conformance/spir/run_services.cpp b/test_conformance/spir/run_services.cpp index 521156bf..8ecea449 100644 --- a/test_conformance/spir/run_services.cpp +++ b/test_conformance/spir/run_services.cpp @@ -115,7 +115,7 @@ void create_context_and_queue(cl_device_id device, cl_context *out_context, cl_c throw Exceptions::TestError("clCreateContext failed\n", error); } - *out_queue = clCreateCommandQueueWithProperties( *out_context, device, 0, &error ); + *out_queue = clCreateCommandQueue( *out_context, device, 0, &error ); if( NULL == *out_queue || error ) { throw Exceptions::TestError("clCreateCommandQueue failed\n", error);