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 <kevin.petit@arm.com>
This commit is contained in:
Kevin Petit
2020-02-20 12:04:07 +00:00
parent b40fb16571
commit e306ecd691
19 changed files with 34 additions and 82 deletions

View File

@@ -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<num_devices; i++) {
if (devices[i]) {
if ((queues[i] = clCreateCommandQueueWithProperties(ctx, devices[i], 0, &err)) == NULL) {
if ((queues[i] = clCreateCommandQueue(ctx, devices[i], 0, &err)) == NULL) {
print_error(err, "Failed creating command queues.");
failed = 1;
goto cleanup;

View File

@@ -112,14 +112,6 @@ static cl_int restoreImage(cl_command_queue *queues, cl_mem *mem_objects, cl_uin
return CL_SUCCESS;
}
// Declaration moved out of protected scope/goto
cl_sampler_properties properties[] = {
CL_SAMPLER_NORMALIZED_COORDS, CL_FALSE,
CL_SAMPLER_ADDRESSING_MODE, CL_ADDRESS_CLAMP,
CL_SAMPLER_FILTER_MODE, CL_FILTER_NEAREST,
0
};
int test_image_migrate(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
{
int failed = 0;
@@ -244,7 +236,7 @@ int test_image_migrate(cl_device_id deviceID, cl_context context, cl_command_que
// Create a command queue for each sub-device
for (i=0; i<num_devices; i++) {
if (devices[i]) {
if ((queues[i] = clCreateCommandQueueWithProperties(ctx, devices[i], 0, &err)) == NULL) {
if ((queues[i] = clCreateCommandQueue(ctx, devices[i], 0, &err)) == NULL) {
print_error(err, "Failed creating command queues.");
failed = 1;
goto cleanup;
@@ -266,7 +258,7 @@ int test_image_migrate(cl_device_id deviceID, cl_context context, cl_command_que
}
// Create sampler.
sampler = clCreateSamplerWithProperties(ctx, properties, &err );
sampler = clCreateSampler(ctx, CL_FALSE, CL_ADDRESS_CLAMP, CL_FILTER_NEAREST, &err );
if ((err != CL_SUCCESS) || !sampler) {
print_error(err, "Failed to create a sampler.");
failed = 1;

View File

@@ -429,10 +429,10 @@ int test_sub_buffers_read_write_dual_devices( cl_device_id deviceID, cl_context
test_error( error, "Unable to create shared context" );
// Create two queues (can't use the existing one, because it's on the wrong context)
clCommandQueueWrapper queue1 = clCreateCommandQueueWithProperties( testingContext, deviceID, 0, &error );
clCommandQueueWrapper queue1 = clCreateCommandQueue( testingContext, deviceID, 0, &error );
test_error( error, "Unable to create command queue on main device" );
clCommandQueueWrapper queue2 = clCreateCommandQueueWithProperties( testingContext, otherDevice, 0, &error );
clCommandQueueWrapper queue2 = clCreateCommandQueue( testingContext, otherDevice, 0, &error );
test_error( error, "Unable to create command queue on secondary device" );
// Determine the reasonable buffer size and address alignment that applies to BOTH devices