diff --git a/test_conformance/SVM/main.cpp b/test_conformance/SVM/main.cpp index aef43727..7a95fd0b 100644 --- a/test_conformance/SVM/main.cpp +++ b/test_conformance/SVM/main.cpp @@ -240,7 +240,7 @@ cl_int create_cl_objects(cl_device_id device_from_harness, const char** ppCodeSt return 1; // 1 indicates do not execute, but counts as passing. } - cl_context_properties context_properties[3] = {CL_CONTEXT_PLATFORM, (cl_context_properties)platform_id, NULL }; + cl_context_properties context_properties[3] = {CL_CONTEXT_PLATFORM, (cl_context_properties)platform_id, 0 }; *context = clCreateContext(context_properties, *num_devices, &devices[0], NULL, NULL, &error); test_error(error, "Unable to create context" ); diff --git a/test_conformance/api/test_create_context_from_type.cpp b/test_conformance/api/test_create_context_from_type.cpp index e9b1e39b..202b6945 100644 --- a/test_conformance/api/test_create_context_from_type.cpp +++ b/test_conformance/api/test_create_context_from_type.cpp @@ -58,7 +58,7 @@ int test_create_context_from_type(cl_device_id deviceID, cl_context context, cl_ cl_context_properties properties[3] = { (cl_context_properties)CL_CONTEXT_PLATFORM, (cl_context_properties)platform, - NULL + 0 }; context_to_test = clCreateContextFromType(properties, type, notify_callback, NULL, &error); @@ -68,7 +68,7 @@ int test_create_context_from_type(cl_device_id deviceID, cl_context context, cl_ return -1; } - queue_to_test = clCreateCommandQueue(context_to_test, deviceID, NULL, &error); + queue_to_test = clCreateCommandQueue(context_to_test, deviceID, 0, &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_kernels.c b/test_conformance/api/test_kernels.c index 287adaeb..e65c4f0a 100644 --- a/test_conformance/api/test_kernels.c +++ b/test_conformance/api/test_kernels.c @@ -111,7 +111,7 @@ int test_get_kernel_info(cl_device_id deviceID, cl_context context, cl_command_q return -1; } - error = clGetKernelInfo( kernel, CL_KERNEL_FUNCTION_NAME, NULL, 0, ¶mSize ); + error = clGetKernelInfo( kernel, CL_KERNEL_FUNCTION_NAME, 0, NULL, ¶mSize ); test_error( error, "Unable to get kernel function name param size" ); if( paramSize != strlen( "sample_test" ) + 1 ) { @@ -157,7 +157,7 @@ int test_get_kernel_info(cl_device_id deviceID, cl_context context, cl_command_q test_error( error, "Unable to get kernel reference count" ); - error = clGetKernelInfo( kernel, CL_KERNEL_PROGRAM, NULL, 0, ¶mSize ); + error = clGetKernelInfo( kernel, CL_KERNEL_PROGRAM, 0, NULL, ¶mSize ); test_error( error, "Unable to get kernel program param size" ); if( paramSize != sizeof( testProgram ) ) { diff --git a/test_conformance/api/test_queue_properties.cpp b/test_conformance/api/test_queue_properties.cpp index 6560d786..992f1c8a 100644 --- a/test_conformance/api/test_queue_properties.cpp +++ b/test_conformance/api/test_queue_properties.cpp @@ -109,7 +109,7 @@ int test_queue_properties(cl_device_id deviceID, cl_context context, cl_command_ clKernelWrapper kernel; size_t strSize; std::string strExt(0, '\0'); - cl_queue_properties_khr device_props = NULL; + cl_queue_properties_khr device_props = 0; cl_queue_properties_khr queue_prop_def[] = { CL_QUEUE_PROPERTIES, 0, 0 }; // Query extension diff --git a/test_conformance/basic/test_enqueue_map.cpp b/test_conformance/basic/test_enqueue_map.cpp index 76e2e865..c2b0af50 100644 --- a/test_conformance/basic/test_enqueue_map.cpp +++ b/test_conformance/basic/test_enqueue_map.cpp @@ -172,7 +172,7 @@ int test_enqueue_map_image(cl_device_id deviceID, cl_context context, cl_command if (!(flag_set[src_flag_id] & CL_MEM_USE_HOST_PTR) && !(flag_set[src_flag_id] & CL_MEM_COPY_HOST_PTR)) { size_t write_origin[3]={0,0,0}, write_region[3]={imageSize, imageSize, 1}; - error = clEnqueueWriteImage(queue, memObject, CL_TRUE, write_origin, write_region, NULL, NULL, initialData, 0, NULL, NULL); + error = clEnqueueWriteImage(queue, memObject, CL_TRUE, write_origin, write_region, 0, 0, initialData, 0, NULL, NULL); test_error( error, "Unable to write to testing buffer" ); } diff --git a/test_conformance/compiler/test_build_helpers.c b/test_conformance/compiler/test_build_helpers.c index 0828877f..b4d3c379 100644 --- a/test_conformance/compiler/test_build_helpers.c +++ b/test_conformance/compiler/test_build_helpers.c @@ -84,7 +84,7 @@ int test_load_program_source(cl_device_id deviceID, cl_context context, cl_comma test_error( error, "Unable to create reference program" ); /* Now get the source and compare against our original */ - error = clGetProgramInfo( program, CL_PROGRAM_SOURCE, NULL, NULL, &length ); + error = clGetProgramInfo( program, CL_PROGRAM_SOURCE, 0, NULL, &length ); test_error( error, "Unable to get length of first program source" ); // Note: according to spec section 5.4.5, the length returned should include the null terminator @@ -366,7 +366,7 @@ int test_get_program_info(cl_device_id deviceID, cl_context context, cl_command_ test_error( error, "Unable to get instance count" ); /* While we're at it, test the sizes of programInfo too */ - error = clGetProgramInfo( program, CL_PROGRAM_DEVICES, NULL, NULL, ¶mSize ); + error = clGetProgramInfo( program, CL_PROGRAM_DEVICES, 0, NULL, ¶mSize ); test_error( error, "Unable to get device param size" ); if( paramSize != sizeof( cl_device_id ) ) { @@ -374,7 +374,7 @@ int test_get_program_info(cl_device_id deviceID, cl_context context, cl_command_ return -1; } - error = clGetProgramInfo( program, CL_PROGRAM_CONTEXT, NULL, NULL, ¶mSize ); + error = clGetProgramInfo( program, CL_PROGRAM_CONTEXT, 0, NULL, ¶mSize ); test_error( error, "Unable to get context param size" ); if( paramSize != sizeof( cl_context ) ) { @@ -382,7 +382,7 @@ int test_get_program_info(cl_device_id deviceID, cl_context context, cl_command_ return -1; } - error = clGetProgramInfo( program, CL_PROGRAM_REFERENCE_COUNT, NULL, NULL, ¶mSize ); + error = clGetProgramInfo( program, CL_PROGRAM_REFERENCE_COUNT, 0, NULL, ¶mSize ); test_error( error, "Unable to get instance param size" ); if( paramSize != sizeof( cl_uint ) ) { @@ -390,7 +390,7 @@ int test_get_program_info(cl_device_id deviceID, cl_context context, cl_command_ return -1; } - error = clGetProgramInfo( program, CL_PROGRAM_NUM_DEVICES, NULL, NULL, ¶mSize ); + error = clGetProgramInfo( program, CL_PROGRAM_NUM_DEVICES, 0, NULL, ¶mSize ); test_error( error, "Unable to get device count param size" ); if( paramSize != sizeof( cl_uint ) ) { @@ -421,7 +421,7 @@ int test_get_program_source(cl_device_id deviceID, cl_context context, cl_comman } /* Try getting the length */ - error = clGetProgramInfo( program, CL_PROGRAM_SOURCE, NULL, NULL, &length ); + error = clGetProgramInfo( program, CL_PROGRAM_SOURCE, 0, NULL, &length ); test_error( error, "Unable to get program source length" ); if (length != strlen(sample_kernel_code_single_line[0]) + 1 && gCompilationMode == kOnline) { @@ -556,7 +556,7 @@ int test_get_program_build_info(cl_device_id deviceID, cl_context context, cl_co return -1; } - error = clGetProgramBuildInfo( program, deviceID, CL_PROGRAM_BUILD_OPTIONS, NULL, NULL, &length ); + error = clGetProgramBuildInfo( program, deviceID, CL_PROGRAM_BUILD_OPTIONS, 0, NULL, &length ); test_error( error, "Unable to get program build options" ); buffer = (char*)malloc(length); diff --git a/test_conformance/generic_address_space/main.cpp b/test_conformance/generic_address_space/main.cpp index 112f45c8..b0efe84d 100644 --- a/test_conformance/generic_address_space/main.cpp +++ b/test_conformance/generic_address_space/main.cpp @@ -75,5 +75,5 @@ const int test_num = ARRAY_SIZE( test_list ); int main(int argc, const char *argv[]) { - return runTestHarness(argc, argv, test_num, test_list, false, false, NULL); + return runTestHarness(argc, argv, test_num, test_list, false, false, 0); } diff --git a/test_conformance/images/clFillImage/test_fill_generic.cpp b/test_conformance/images/clFillImage/test_fill_generic.cpp index 2f30f2a2..6b59bada 100644 --- a/test_conformance/images/clFillImage/test_fill_generic.cpp +++ b/test_conformance/images/clFillImage/test_fill_generic.cpp @@ -431,7 +431,7 @@ int test_fill_image_generic( cl_context context, cl_command_queue queue, image_d if (error != CL_SUCCESS) { log_error( "ERROR: Unable to map image for verification: %s\n", IGetErrorString( error ) ); - return NULL; + return -1; } // Verify scanline by scanline, since the pitches are different @@ -560,7 +560,7 @@ int test_fill_image_generic( cl_context context, cl_command_queue queue, image_d if (error != CL_SUCCESS) { log_error( "ERROR: Unable to unmap image after verify: %s\n", IGetErrorString( error ) ); - return NULL; + return -1; } imgHost.reset(0x0); diff --git a/test_conformance/profiling/execute.c b/test_conformance/profiling/execute.c index 424dbf92..31a5db89 100644 --- a/test_conformance/profiling/execute.c +++ b/test_conformance/profiling/execute.c @@ -250,9 +250,9 @@ static int kernelFilter( cl_device_id device, cl_context context, cl_command_que } #ifdef USE_LOCAL_THREADS - err = clEnqueueNDRangeKernel( queue, kernel[0], 2, NULL, threads, localThreads, NULL, 0, &executeEvent ); + err = clEnqueueNDRangeKernel( queue, kernel[0], 2, NULL, threads, localThreads, 0, NULL, &executeEvent ); #else - err = clEnqueueNDRangeKernel( queue, kernel[0], 2, NULL, threads, NULL, NULL, 0, &executeEvent ); + err = clEnqueueNDRangeKernel( queue, kernel[0], 2, NULL, threads, NULL, 0, NULL, &executeEvent ); #endif if( err != CL_SUCCESS ){ diff --git a/test_conformance/profiling/execute_multipass.c b/test_conformance/profiling/execute_multipass.c index bac7315c..70512441 100644 --- a/test_conformance/profiling/execute_multipass.c +++ b/test_conformance/profiling/execute_multipass.c @@ -160,7 +160,7 @@ static int run_kernel( cl_device_id device, cl_context context, cl_command_queue return -1; } - err = clEnqueueNDRangeKernel( queue, kernel[0], 3, NULL, threads, localThreads, NULL, 0, &executeEvent ); + err = clEnqueueNDRangeKernel( queue, kernel[0], 3, NULL, threads, localThreads, 0, NULL, &executeEvent ); if( err != CL_SUCCESS ){ print_error( err, "clEnqueueNDRangeKernel failed\n" ); diff --git a/test_conformance/subgroups/main.cpp b/test_conformance/subgroups/main.cpp index cf7e73f3..445a6a8a 100644 --- a/test_conformance/subgroups/main.cpp +++ b/test_conformance/subgroups/main.cpp @@ -59,6 +59,6 @@ static test_status checkSubGroupsExtension(cl_device_id device) int main(int argc, const char *argv[]) { gMTdata = init_genrand(0); - return runTestHarnessWithCheck(argc, argv, test_num, test_list, false, false, NULL, checkSubGroupsExtension); + return runTestHarnessWithCheck(argc, argv, test_num, test_list, false, false, 0, checkSubGroupsExtension); }