diff --git a/test_conformance/extensions/cl_khr_command_buffer/basic_command_buffer.cpp b/test_conformance/extensions/cl_khr_command_buffer/basic_command_buffer.cpp index 6c02f9f788..b3e0a93e74 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/basic_command_buffer.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/basic_command_buffer.cpp @@ -254,8 +254,8 @@ struct MixedCommandsTest : public BasicCommandBufferTest { const cl_int pattern = pattern_base + i; cl_int error = clCommandFillBufferKHR( - command_buffer, nullptr, in_mem, &pattern, sizeof(cl_int), 0, - data_size(), 0, nullptr, nullptr, nullptr); + command_buffer, nullptr, nullptr, in_mem, &pattern, + sizeof(cl_int), 0, data_size(), 0, nullptr, nullptr, nullptr); test_error(error, "clCommandFillBufferKHR failed"); error = clCommandNDRangeKernelKHR( @@ -265,8 +265,8 @@ struct MixedCommandsTest : public BasicCommandBufferTest const size_t result_offset = i * sizeof(cl_int); error = clCommandCopyBufferKHR( - command_buffer, nullptr, out_mem, result_mem, 0, result_offset, - sizeof(cl_int), 0, nullptr, nullptr, nullptr); + command_buffer, nullptr, nullptr, out_mem, result_mem, 0, + result_offset, sizeof(cl_int), 0, nullptr, nullptr, nullptr); test_error(error, "clCommandCopyBufferKHR failed"); } diff --git a/test_conformance/extensions/cl_khr_command_buffer/basic_command_buffer.h b/test_conformance/extensions/cl_khr_command_buffer/basic_command_buffer.h index d08a11af2e..3981427c0c 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/basic_command_buffer.h +++ b/test_conformance/extensions/cl_khr_command_buffer/basic_command_buffer.h @@ -87,8 +87,30 @@ template int MakeAndRunTest(cl_device_id device, cl_context context, cl_command_queue queue, int num_elements) { - CHECK_COMMAND_BUFFER_EXTENSION_AVAILABLE(device); + if (!is_extension_available(device, "cl_khr_command_buffer")) + { + log_info("Device does not support 'cl_khr_command_buffer'. Skipping " + "the test.\n"); + return TEST_SKIPPED_ITSELF; + } + + Version device_version = get_device_cl_version(device); + if ((device_version >= Version(3, 0)) + || is_extension_available(device, "cl_khr_extended_versioning")) + { + + cl_version extension_version = + get_extension_version(device, "cl_khr_command_buffer"); + if (extension_version < CL_MAKE_VERSION(0, 9, 5)) + { + + log_info("cl_khr_command_buffer version 0.9.5 or later is required " + "to run " + "the test, skipping.\n "); + return TEST_SKIPPED_ITSELF; + } + } try { auto test_fixture = T(device, context, queue); diff --git a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_arguments.cpp b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_arguments.cpp index 6c83cd2166..f0e9cb3175 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_arguments.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_arguments.cpp @@ -140,7 +140,7 @@ struct MutableDispatchGlobalArguments : public MutableDispatchArgumentsTest cl_int Run() override { - cl_ndrange_kernel_command_properties_khr props[] = { + cl_command_properties_khr props[] = { CL_MUTABLE_DISPATCH_UPDATABLE_FIELDS_KHR, CL_MUTABLE_DISPATCH_ARGUMENTS_KHR, 0 }; @@ -270,7 +270,7 @@ struct MutableDispatchLocalArguments : public MutableDispatchArgumentsTest threads[0] = number_of_ints; local_threads[0] = 1; - cl_ndrange_kernel_command_properties_khr props[] = { + cl_command_properties_khr props[] = { CL_MUTABLE_DISPATCH_UPDATABLE_FIELDS_KHR, CL_MUTABLE_DISPATCH_ARGUMENTS_KHR, 0 }; @@ -403,7 +403,7 @@ struct MutableDispatchPODArguments : public MutableDispatchArgumentsTest threads[0] = number_of_ints; local_threads[0] = 1; - cl_ndrange_kernel_command_properties_khr props[] = { + cl_command_properties_khr props[] = { CL_MUTABLE_DISPATCH_UPDATABLE_FIELDS_KHR, CL_MUTABLE_DISPATCH_ARGUMENTS_KHR, 0 }; @@ -533,7 +533,8 @@ struct MutableDispatchNullArguments : public MutableDispatchArgumentsTest cl_int Run() override { - cl_ndrange_kernel_command_properties_khr props[] = { + + cl_command_properties_khr props[] = { CL_MUTABLE_DISPATCH_UPDATABLE_FIELDS_KHR, CL_MUTABLE_DISPATCH_ARGUMENTS_KHR, 0 }; @@ -721,7 +722,7 @@ struct MutableDispatchSVMArguments : public MutableDispatchArgumentsTest sizeof(init_buffer), &init_buffer); test_error(error, "clSetKernelExecInfo failed for init_buffer"); - cl_ndrange_kernel_command_properties_khr props[] = { + cl_command_properties_khr props[] = { CL_MUTABLE_DISPATCH_UPDATABLE_FIELDS_KHR, CL_MUTABLE_DISPATCH_ARGUMENTS_KHR | CL_MUTABLE_DISPATCH_EXEC_INFO_KHR, diff --git a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_full_dispatch.cpp b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_full_dispatch.cpp index 411a9d6ae2..753cc3be06 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_full_dispatch.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_full_dispatch.cpp @@ -295,7 +295,7 @@ struct MutableCommandFullDispatch : InfoMutableCommandBufferTest // run command buffer with full mutable dispatch test cl_int Run() override { - cl_ndrange_kernel_command_properties_khr props[] = { + cl_command_properties_khr props[] = { CL_MUTABLE_DISPATCH_UPDATABLE_FIELDS_KHR, available_caps, 0 }; diff --git a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_image_arguments.cpp b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_image_arguments.cpp index 9f8800e1c2..939a785d4a 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_image_arguments.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_image_arguments.cpp @@ -131,7 +131,7 @@ struct MutableDispatchImage1DArguments : public BasicMutableCommandBufferTest error = clSetKernelArg(kernel, 2, sizeof(cl_mem), &dst_image); test_error(error, "Unable to set indexed kernel arguments"); - cl_ndrange_kernel_command_properties_khr props[] = { + cl_command_properties_khr props[] = { CL_MUTABLE_DISPATCH_UPDATABLE_FIELDS_KHR, CL_MUTABLE_DISPATCH_ARGUMENTS_KHR, 0 }; @@ -331,7 +331,7 @@ struct MutableDispatchImage2DArguments : public BasicMutableCommandBufferTest size_t globalDim[3] = { 4, 4, 1 }, localDim[3] = { 1, 1, 1 }; - cl_ndrange_kernel_command_properties_khr props[] = { + cl_command_properties_khr props[] = { CL_MUTABLE_DISPATCH_UPDATABLE_FIELDS_KHR, CL_MUTABLE_DISPATCH_ARGUMENTS_KHR, 0 }; diff --git a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_info.cpp b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_info.cpp index 71b9017ec3..2b5b3b42e8 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_info.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_info.cpp @@ -34,7 +34,7 @@ // CL_DEVICE_MUTABLE_DISPATCH_CAPABILITIES_KHR // CL_MUTABLE_COMMAND_COMMAND_QUEUE_KHR // CL_MUTABLE_COMMAND_COMMAND_BUFFER_KHR -// CL_MUTABLE_DISPATCH_PROPERTIES_ARRAY_KHR +// CL_MUTABLE_COMMAND_PROPERTIES_ARRAY_KHR // CL_MUTABLE_DISPATCH_KERNEL_KHR // CL_MUTABLE_DISPATCH_DIMENSIONS_KHR // CL_MUTABLE_DISPATCH_GLOBAL_WORK_OFFSET_KHR @@ -117,9 +117,27 @@ struct PropertiesArray : public InfoMutableCommandBufferTest : InfoMutableCommandBufferTest(device, context, queue) {} + virtual bool Skip() override + { + Version device_version = get_device_cl_version(device); + if ((device_version >= Version(3, 0)) + || is_extension_available(device, "cl_khr_extended_versioning")) + { + + cl_version extension_version = get_extension_version( + device, "cl_khr_command_buffer_mutable_dispatch"); + + if (extension_version < CL_MAKE_VERSION(0, 9, 3)) + { + return true; + } + } + return InfoMutableCommandBufferTest::Skip(); + } + cl_int Run() override { - cl_ndrange_kernel_command_properties_khr props[] = { + cl_command_properties_khr props[] = { CL_MUTABLE_DISPATCH_UPDATABLE_FIELDS_KHR, CL_MUTABLE_DISPATCH_ARGUMENTS_KHR, 0 }; @@ -129,11 +147,11 @@ struct PropertiesArray : public InfoMutableCommandBufferTest &global_work_size, nullptr, 0, nullptr, nullptr, &command); test_error(error, "clCommandNDRangeKernelKHR failed"); - cl_ndrange_kernel_command_properties_khr test_props[] = { 0, 0, 0 }; + cl_command_properties_khr test_props[] = { 0, 0, 0 }; size_t size; error = clGetMutableCommandInfoKHR( - command, CL_MUTABLE_DISPATCH_PROPERTIES_ARRAY_KHR, + command, CL_MUTABLE_COMMAND_PROPERTIES_ARRAY_KHR, sizeof(test_props), test_props, &size); test_error(error, "clGetMutableCommandInfoKHR failed"); diff --git a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_simultaneous.cpp b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_simultaneous.cpp index 81ce85c9bd..f6a407a522 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_simultaneous.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_simultaneous.cpp @@ -170,14 +170,15 @@ struct SimultaneousMutableDispatchTest : public BasicMutableCommandBufferTest cl_sync_point_khr sync_points[2]; const cl_int pattern = pattern_pri; cl_int error = clCommandFillBufferKHR( - work_command_buffer, nullptr, in_mem, &pattern, sizeof(cl_int), 0, - data_size(), 0, nullptr, &sync_points[0], nullptr); + work_command_buffer, nullptr, nullptr, in_mem, &pattern, + sizeof(cl_int), 0, data_size(), 0, nullptr, &sync_points[0], + nullptr); test_error(error, "clCommandFillBufferKHR failed"); - error = clCommandFillBufferKHR(work_command_buffer, nullptr, out_mem, - &overwritten_pattern, sizeof(cl_int), 0, - data_size(), 0, nullptr, &sync_points[1], - nullptr); + error = clCommandFillBufferKHR(work_command_buffer, nullptr, nullptr, + out_mem, &overwritten_pattern, + sizeof(cl_int), 0, data_size(), 0, + nullptr, &sync_points[1], nullptr); test_error(error, "clCommandFillBufferKHR failed"); error = clCommandNDRangeKernelKHR( @@ -268,8 +269,8 @@ struct SimultaneousMutableDispatchTest : public BasicMutableCommandBufferTest cl_sync_point_khr sync_points[2]; // for both simultaneous passes this call will fill entire in_mem buffer cl_int error = clCommandFillBufferKHR( - work_command_buffer, nullptr, in_mem, &pattern_pri, sizeof(cl_int), - 0, data_size() * buffer_size_multiplier, 0, nullptr, + work_command_buffer, nullptr, nullptr, in_mem, &pattern_pri, + sizeof(cl_int), 0, data_size() * buffer_size_multiplier, 0, nullptr, &sync_points[0], nullptr); test_error(error, "clCommandFillBufferKHR failed"); @@ -517,11 +518,11 @@ struct CrossQueueSimultaneousMutableDispatchTest // record command buffer cl_int pattern = 0; cl_int error = clCommandFillBufferKHR( - command_buffer, nullptr, out_mem, &pattern, sizeof(cl_int), 0, - data_size(), 0, nullptr, nullptr, nullptr); + command_buffer, nullptr, nullptr, out_mem, &pattern, sizeof(cl_int), + 0, data_size(), 0, nullptr, nullptr, nullptr); test_error(error, "clCommandFillBufferKHR failed"); - cl_ndrange_kernel_command_properties_khr props[] = { + cl_command_properties_khr props[] = { CL_MUTABLE_DISPATCH_UPDATABLE_FIELDS_KHR, CL_MUTABLE_DISPATCH_ARGUMENTS_KHR, 0 }; diff --git a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_work_groups.cpp b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_work_groups.cpp index bea337e1fe..aaf0caa4a8 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_work_groups.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_work_groups.cpp @@ -34,7 +34,7 @@ struct Configuration { const cl_command_buffer_properties_khr *command_buffer_properties; - const cl_ndrange_kernel_command_properties_khr *ndrange_properties; + const cl_command_properties_khr *ndrange_properties; }; // Define the command buffer properties for each configuration @@ -44,7 +44,7 @@ const cl_command_buffer_properties_khr command_buffer_properties[] = { }; // Define the ndrange properties -const cl_ndrange_kernel_command_properties_khr ndrange_properties[] = { +const cl_command_properties_khr ndrange_properties[] = { CL_MUTABLE_DISPATCH_UPDATABLE_FIELDS_KHR, CL_MUTABLE_DISPATCH_GLOBAL_SIZE_KHR, CL_MUTABLE_DISPATCH_ASSERTS_KHR, CL_MUTABLE_DISPATCH_ASSERT_NO_ADDITIONAL_WORK_GROUPS_KHR, 0 diff --git a/test_conformance/extensions/cl_khr_command_buffer/command_buffer_out_of_order.cpp b/test_conformance/extensions/cl_khr_command_buffer/command_buffer_out_of_order.cpp index 9e142bf20a..e6cea2278e 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/command_buffer_out_of_order.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/command_buffer_out_of_order.cpp @@ -161,14 +161,14 @@ struct OutOfOrderTest : public BasicCommandBufferTest { cl_sync_point_khr sync_points[2]; const cl_int pattern = pattern_pri; - cl_int error = - clCommandFillBufferKHR(out_of_order_command_buffer, nullptr, in_mem, - &pattern, sizeof(cl_int), 0, data_size(), 0, - nullptr, &sync_points[0], nullptr); + cl_int error = clCommandFillBufferKHR( + out_of_order_command_buffer, nullptr, nullptr, in_mem, &pattern, + sizeof(cl_int), 0, data_size(), 0, nullptr, &sync_points[0], + nullptr); test_error(error, "clCommandFillBufferKHR failed"); error = clCommandFillBufferKHR(out_of_order_command_buffer, nullptr, - out_mem, &overwritten_pattern, + nullptr, out_mem, &overwritten_pattern, sizeof(cl_int), 0, data_size(), 0, nullptr, &sync_points[1], nullptr); test_error(error, "clCommandFillBufferKHR failed"); @@ -214,7 +214,7 @@ struct OutOfOrderTest : public BasicCommandBufferTest cl_sync_point_khr sync_points[2]; // for both simultaneous passes this call will fill entire in_mem buffer cl_int error = clCommandFillBufferKHR( - out_of_order_command_buffer, nullptr, in_mem, &pattern_pri, + out_of_order_command_buffer, nullptr, nullptr, in_mem, &pattern_pri, sizeof(cl_int), 0, data_size() * buffer_size_multiplier, 0, nullptr, &sync_points[0], nullptr); test_error(error, "clCommandFillBufferKHR failed"); diff --git a/test_conformance/extensions/cl_khr_command_buffer/command_buffer_test_barrier.cpp b/test_conformance/extensions/cl_khr_command_buffer/command_buffer_test_barrier.cpp index 82ff16f0ec..72c5fcfb23 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/command_buffer_test_barrier.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/command_buffer_test_barrier.cpp @@ -40,22 +40,22 @@ struct BarrierWithWaitListKHR : public BasicCommandBufferTest cl_int Run() override { - cl_int error = - clCommandFillBufferKHR(out_of_order_command_buffer, nullptr, in_mem, - &pattern, sizeof(cl_int), 0, data_size(), 0, - nullptr, &sync_points[0], nullptr); + cl_int error = clCommandFillBufferKHR( + out_of_order_command_buffer, nullptr, nullptr, in_mem, &pattern, + sizeof(cl_int), 0, data_size(), 0, nullptr, &sync_points[0], + nullptr); test_error(error, "clCommandFillBufferKHR failed"); const cl_int overwritten_pattern = 0xACDC; error = clCommandFillBufferKHR(out_of_order_command_buffer, nullptr, - out_mem, &overwritten_pattern, + nullptr, out_mem, &overwritten_pattern, sizeof(cl_int), 0, data_size(), 0, nullptr, &sync_points[1], nullptr); test_error(error, "clCommandFillBufferKHR failed"); error = clCommandBarrierWithWaitListKHR(out_of_order_command_buffer, - nullptr, 2, sync_points, - nullptr, nullptr); + nullptr, nullptr, 2, + sync_points, nullptr, nullptr); test_error(error, "clCommandBarrierWithWaitListKHR failed"); error = clCommandNDRangeKernelKHR( diff --git a/test_conformance/extensions/cl_khr_command_buffer/command_buffer_test_base.h b/test_conformance/extensions/cl_khr_command_buffer/command_buffer_test_base.h index 48abe25d70..dc44264125 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/command_buffer_test_base.h +++ b/test_conformance/extensions/cl_khr_command_buffer/command_buffer_test_base.h @@ -161,17 +161,4 @@ class clCommandBufferWrapper { operator cl_command_buffer_khr() const { return object; } }; - -#define CHECK_COMMAND_BUFFER_EXTENSION_AVAILABLE(device) \ - { \ - if (!is_extension_available(device, "cl_khr_command_buffer")) \ - { \ - log_info( \ - "Device does not support 'cl_khr_command_buffer'. Skipping " \ - "the test.\n"); \ - return TEST_SKIPPED_ITSELF; \ - } \ - } - - #endif // CL_KHR_COMMAND_BUFFER_TEST_BASE_H diff --git a/test_conformance/extensions/cl_khr_command_buffer/command_buffer_test_copy.cpp b/test_conformance/extensions/cl_khr_command_buffer/command_buffer_test_copy.cpp index 0a30e76b22..c49974c873 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/command_buffer_test_copy.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/command_buffer_test_copy.cpp @@ -38,15 +38,15 @@ struct CopyImageKHR : public BasicCommandBufferTest cl_int Run() override { - cl_int error = clCommandFillImageKHR(command_buffer, nullptr, src_image, - fill_color_1, origin, region, 0, - nullptr, nullptr, nullptr); + cl_int error = clCommandFillImageKHR( + command_buffer, nullptr, nullptr, src_image, fill_color_1, origin, + region, 0, nullptr, nullptr, nullptr); test_error(error, "clCommandFillImageKHR failed"); - error = clCommandCopyImageKHR(command_buffer, nullptr, src_image, - dst_image, origin, origin, region, 0, 0, - nullptr, nullptr); + error = clCommandCopyImageKHR(command_buffer, nullptr, nullptr, + src_image, dst_image, origin, origin, + region, 0, 0, nullptr, nullptr); test_error(error, "clCommandCopyImageKHR failed"); @@ -141,13 +141,13 @@ struct CopyBufferKHR : public BasicCommandBufferTest cl_int Run() override { cl_int error = clCommandFillBufferKHR( - command_buffer, nullptr, in_mem, &pattern_1, sizeof(cl_char), 0, - data_size(), 0, nullptr, nullptr, nullptr); + command_buffer, nullptr, nullptr, in_mem, &pattern_1, + sizeof(cl_char), 0, data_size(), 0, nullptr, nullptr, nullptr); test_error(error, "clCommandFillBufferKHR failed"); - error = clCommandCopyBufferKHR(command_buffer, nullptr, in_mem, out_mem, - 0, 0, data_size(), 0, nullptr, nullptr, - nullptr); + error = clCommandCopyBufferKHR(command_buffer, nullptr, nullptr, in_mem, + out_mem, 0, 0, data_size(), 0, nullptr, + nullptr, nullptr); test_error(error, "clCommandCopyBufferKHR failed"); error = clFinalizeCommandBufferKHR(command_buffer); @@ -204,14 +204,15 @@ struct CopySVMBufferKHR : public BasicSVMCommandBufferTest cl_int Run() override { + cl_int error = clCommandSVMMemFillKHR( - command_buffer, nullptr, svm_in_mem(), &pattern_1, sizeof(cl_char), - data_size(), 0, nullptr, nullptr, nullptr); + command_buffer, nullptr, nullptr, svm_in_mem(), &pattern_1, + sizeof(cl_char), data_size(), 0, nullptr, nullptr, nullptr); test_error(error, "clCommandSVMMemFillKHR failed"); - error = clCommandSVMMemcpyKHR(command_buffer, nullptr, svm_out_mem(), - svm_in_mem(), data_size(), 0, nullptr, - nullptr, nullptr); + error = clCommandSVMMemcpyKHR(command_buffer, nullptr, nullptr, + svm_out_mem(), svm_in_mem(), data_size(), + 0, nullptr, nullptr, nullptr); test_error(error, "clCommandSVMMemcpyKHR failed"); error = clFinalizeCommandBufferKHR(command_buffer); @@ -273,15 +274,13 @@ struct CopyBufferToImageKHR : public BasicCommandBufferTest cl_int Run() override { cl_int error = clCommandFillBufferKHR( - command_buffer, nullptr, buffer, &pattern_1, sizeof(cl_char), 0, - data_size, 0, nullptr, nullptr, nullptr); - + command_buffer, nullptr, nullptr, buffer, &pattern_1, + sizeof(cl_char), 0, data_size, 0, nullptr, nullptr, nullptr); test_error(error, "clCommandFillBufferKHR failed"); - error = clCommandCopyBufferToImageKHR(command_buffer, nullptr, buffer, - image, 0, origin, region, 0, 0, - nullptr, nullptr); - + error = clCommandCopyBufferToImageKHR(command_buffer, nullptr, nullptr, + buffer, image, 0, origin, region, + 0, 0, nullptr, nullptr); test_error(error, "clCommandCopyBufferToImageKHR failed"); error = clFinalizeCommandBufferKHR(command_buffer); @@ -379,16 +378,14 @@ struct CopyImageToBufferKHR : public BasicCommandBufferTest cl_int Run() override { - cl_int error = - clCommandFillImageKHR(command_buffer, nullptr, image, fill_color_1, - origin, region, 0, nullptr, nullptr, nullptr); - + cl_int error = clCommandFillImageKHR( + command_buffer, nullptr, nullptr, image, fill_color_1, origin, + region, 0, nullptr, nullptr, nullptr); test_error(error, "clCommandFillImageKHR failed"); - error = clCommandCopyImageToBufferKHR(command_buffer, nullptr, image, - buffer, origin, region, 0, 0, - nullptr, nullptr, nullptr); - + error = clCommandCopyImageToBufferKHR(command_buffer, nullptr, nullptr, + image, buffer, origin, region, 0, + 0, nullptr, nullptr, nullptr); test_error(error, "clCommandCopyImageToBufferKHR failed"); error = clFinalizeCommandBufferKHR(command_buffer); @@ -484,14 +481,13 @@ struct CopyBufferRectKHR : public BasicCommandBufferTest cl_int Run() override { cl_int error = clCommandFillBufferKHR( - command_buffer, nullptr, in_mem, &pattern_1, sizeof(cl_char), 0, - data_size, 0, nullptr, nullptr, nullptr); + command_buffer, nullptr, nullptr, in_mem, &pattern_1, + sizeof(cl_char), 0, data_size, 0, nullptr, nullptr, nullptr); test_error(error, "clCommandFillBufferKHR failed"); error = clCommandCopyBufferRectKHR( - command_buffer, nullptr, in_mem, out_mem, origin, origin, region, 0, - 0, 0, 0, 0, nullptr, nullptr, nullptr); - + command_buffer, nullptr, nullptr, in_mem, out_mem, origin, origin, + region, 0, 0, 0, 0, 0, nullptr, nullptr, nullptr); test_error(error, "clCommandCopyBufferRectKHR failed"); error = clFinalizeCommandBufferKHR(command_buffer); diff --git a/test_conformance/extensions/cl_khr_command_buffer/command_buffer_test_fill.cpp b/test_conformance/extensions/cl_khr_command_buffer/command_buffer_test_fill.cpp index 67809cfb91..d0311a6532 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/command_buffer_test_fill.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/command_buffer_test_fill.cpp @@ -35,10 +35,9 @@ struct FillImageKHR : public BasicCommandBufferTest cl_int Run() override { - cl_int error = - clCommandFillImageKHR(command_buffer, nullptr, image, fill_color_1, - origin, region, 0, nullptr, nullptr, nullptr); - + cl_int error = clCommandFillImageKHR( + command_buffer, nullptr, nullptr, image, fill_color_1, origin, + region, 0, nullptr, nullptr, nullptr); test_error(error, "clCommandFillImageKHR failed"); error = clFinalizeCommandBufferKHR(command_buffer); @@ -124,9 +123,8 @@ struct FillBufferKHR : public BasicCommandBufferTest cl_int Run() override { cl_int error = clCommandFillBufferKHR( - command_buffer, nullptr, in_mem, &pattern_1, sizeof(cl_char), 0, - data_size(), 0, nullptr, nullptr, nullptr); - + command_buffer, nullptr, nullptr, in_mem, &pattern_1, + sizeof(cl_char), 0, data_size(), 0, nullptr, nullptr, nullptr); test_error(error, "clCommandFillBufferKHR failed"); error = clFinalizeCommandBufferKHR(command_buffer); @@ -179,8 +177,8 @@ struct FillSVMBufferKHR : public BasicSVMCommandBufferTest cl_int Run() override { cl_int error = clCommandSVMMemFillKHR( - command_buffer, nullptr, svm_in_mem(), &pattern_1, sizeof(cl_char), - data_size(), 0, nullptr, nullptr, nullptr); + command_buffer, nullptr, nullptr, svm_in_mem(), &pattern_1, + sizeof(cl_char), data_size(), 0, nullptr, nullptr, nullptr); test_error(error, "clCommandSVMMemFillKHR failed"); error = clFinalizeCommandBufferKHR(command_buffer); diff --git a/test_conformance/extensions/cl_khr_command_buffer/negative_command_buffer_barrier.cpp b/test_conformance/extensions/cl_khr_command_buffer/negative_command_buffer_barrier.cpp index 6e682aa381..ae0dc69df5 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/negative_command_buffer_barrier.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/negative_command_buffer_barrier.cpp @@ -28,7 +28,7 @@ struct CommandBufferBarrierNotNullQueue : public BasicCommandBufferTest cl_int Run() override { cl_int error = clCommandBarrierWithWaitListKHR( - command_buffer, queue, 0, nullptr, nullptr, nullptr); + command_buffer, queue, nullptr, 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_COMMAND_QUEUE, "clCommandBarrierWithWaitListKHR should return " @@ -55,7 +55,7 @@ struct CommandBufferBarrierInvalidCommandBuffer : public BasicCommandBufferTest cl_int Run() override { cl_int error = clCommandBarrierWithWaitListKHR( - nullptr, queue, 0, nullptr, nullptr, nullptr); + nullptr, queue, nullptr, 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_COMMAND_BUFFER_KHR, "clCommandBarrierWithWaitListKHR should return " @@ -76,9 +76,8 @@ struct CommandBufferBarrierBufferFinalized : public BasicCommandBufferTest cl_int error = clFinalizeCommandBufferKHR(command_buffer); test_error(error, "clFinalizeCommandBufferKHR failed"); - error = clCommandBarrierWithWaitListKHR(command_buffer, nullptr, 0, - nullptr, nullptr, nullptr); - + error = clCommandBarrierWithWaitListKHR( + command_buffer, nullptr, nullptr, 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_OPERATION, "clCommandBarrierWithWaitListKHR should return " "CL_INVALID_OPERATION", @@ -97,9 +96,9 @@ struct CommandBufferBarrierMutableHandleNotNull : public BasicCommandBufferTest { cl_mutable_command_khr mutable_handle; - cl_int error = clCommandBarrierWithWaitListKHR( - command_buffer, nullptr, 0, nullptr, nullptr, &mutable_handle); - + cl_int error = + clCommandBarrierWithWaitListKHR(command_buffer, nullptr, nullptr, 0, + nullptr, nullptr, &mutable_handle); test_failure_error_ret(error, CL_INVALID_VALUE, "clCommandBarrierWithWaitListKHR should return " "CL_INVALID_VALUE", @@ -122,8 +121,9 @@ struct CommandBufferBarrierSyncPointsNullOrNumZero { cl_sync_point_khr invalid_point = 0; - cl_int error = clCommandBarrierWithWaitListKHR( - command_buffer, nullptr, 1, &invalid_point, nullptr, nullptr); + cl_int error = + clCommandBarrierWithWaitListKHR(command_buffer, nullptr, nullptr, 1, + &invalid_point, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandBarrierWithWaitListKHR should return " @@ -131,8 +131,8 @@ struct CommandBufferBarrierSyncPointsNullOrNumZero TEST_FAIL); - error = clCommandBarrierWithWaitListKHR(command_buffer, nullptr, 1, - nullptr, nullptr, nullptr); + error = clCommandBarrierWithWaitListKHR( + command_buffer, nullptr, nullptr, 1, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandBarrierWithWaitListKHR should return " @@ -141,13 +141,13 @@ struct CommandBufferBarrierSyncPointsNullOrNumZero cl_sync_point_khr point; - error = - clCommandCopyBufferKHR(command_buffer, nullptr, in_mem, out_mem, 0, - 0, data_size(), 0, nullptr, &point, nullptr); + error = clCommandCopyBufferKHR(command_buffer, nullptr, nullptr, in_mem, + out_mem, 0, 0, data_size(), 0, nullptr, + &point, nullptr); test_error(error, "clCommandCopyBufferKHR failed"); - error = clCommandBarrierWithWaitListKHR(command_buffer, nullptr, 0, - &point, nullptr, nullptr); + error = clCommandBarrierWithWaitListKHR( + command_buffer, nullptr, nullptr, 0, &point, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandBarrierWithWaitListKHR should return " diff --git a/test_conformance/extensions/cl_khr_command_buffer/negative_command_buffer_copy.cpp b/test_conformance/extensions/cl_khr_command_buffer/negative_command_buffer_copy.cpp index 211ffc4d63..20087b93b3 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/negative_command_buffer_copy.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/negative_command_buffer_copy.cpp @@ -95,9 +95,9 @@ struct CommandBufferCopyBufferQueueNotNull cl_int Run() override { - cl_int error = - clCommandCopyBufferKHR(command_buffer, queue, in_mem, out_mem, 0, 0, - data_size, 0, nullptr, nullptr, nullptr); + cl_int error = clCommandCopyBufferKHR(command_buffer, queue, nullptr, + in_mem, out_mem, 0, 0, data_size, + 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_COMMAND_QUEUE, "clCommandCopyBufferKHR should return " @@ -105,8 +105,8 @@ struct CommandBufferCopyBufferQueueNotNull TEST_FAIL); error = clCommandCopyBufferRectKHR( - command_buffer, queue, in_mem, out_mem, origin, origin, region, 0, - 0, 0, 0, 0, nullptr, nullptr, nullptr); + command_buffer, queue, nullptr, in_mem, out_mem, origin, origin, + region, 0, 0, 0, 0, 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_COMMAND_QUEUE, "clCommandCopyBufferRectKHR should return " @@ -126,8 +126,8 @@ struct CommandBufferCopyImageQueueNotNull cl_int Run() override { cl_int error = clCommandCopyImageToBufferKHR( - command_buffer, queue, image, buffer, origin, region, 0, 0, nullptr, - nullptr, nullptr); + command_buffer, queue, nullptr, image, buffer, origin, region, 0, 0, + nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_COMMAND_QUEUE, "clCommandCopyImageToBufferKHR should return " @@ -167,8 +167,8 @@ struct CommandBufferCopyBufferDifferentContexts cl_int Run() override { cl_int error = clCommandCopyBufferKHR( - command_buffer, nullptr, in_mem_ctx, out_mem, 0, 0, data_size, 0, - nullptr, nullptr, nullptr); + command_buffer, nullptr, nullptr, in_mem_ctx, out_mem, 0, 0, + data_size, 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_CONTEXT, "clCommandCopyBufferKHR should return " @@ -177,16 +177,15 @@ struct CommandBufferCopyBufferDifferentContexts error = clCommandCopyBufferRectKHR( - command_buffer, nullptr, in_mem_ctx, out_mem, origin, origin, - region, 0, 0, 0, 0, 0, nullptr, nullptr, nullptr); + command_buffer, nullptr, nullptr, in_mem_ctx, out_mem, origin, + origin, region, 0, 0, 0, 0, 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_CONTEXT, "clCommandCopyBufferRectKHR should return " "CL_INVALID_CONTEXT", TEST_FAIL); - - error = clCommandCopyBufferKHR(command_buffer, nullptr, in_mem, + error = clCommandCopyBufferKHR(command_buffer, nullptr, nullptr, in_mem, out_mem_ctx, 0, 0, data_size, 0, nullptr, nullptr, nullptr); @@ -196,8 +195,8 @@ struct CommandBufferCopyBufferDifferentContexts TEST_FAIL); error = clCommandCopyBufferRectKHR( - command_buffer, nullptr, in_mem, out_mem_ctx, origin, origin, - region, 0, 0, 0, 0, 0, nullptr, nullptr, nullptr); + command_buffer, nullptr, nullptr, in_mem, out_mem_ctx, origin, + origin, region, 0, 0, 0, 0, 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_CONTEXT, "clCommandCopyBufferRectKHR should return " @@ -242,18 +241,17 @@ struct CommandBufferCopyImageDifferentContexts cl_int Run() override { cl_int error = clCommandCopyImageToBufferKHR( - command_buffer, nullptr, image_ctx, buffer, origin, region, 0, 0, - nullptr, nullptr, nullptr); + command_buffer, nullptr, nullptr, image_ctx, buffer, origin, region, + 0, 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_CONTEXT, "clCommandCopyImageToBufferKHR should return " "CL_INVALID_CONTEXT", TEST_FAIL); - - error = clCommandCopyImageToBufferKHR(command_buffer, nullptr, image, - buffer_ctx, origin, region, 0, 0, - nullptr, nullptr, nullptr); + error = clCommandCopyImageToBufferKHR(command_buffer, nullptr, nullptr, + image, buffer_ctx, origin, region, + 0, 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_CONTEXT, "clCommandCopyImageToBufferKHR should return " @@ -282,9 +280,9 @@ struct CommandBufferCopyBufferSyncPointsNullOrNumZero { cl_sync_point_khr invalid_point = 0; - cl_int error = clCommandCopyBufferKHR(command_buffer, nullptr, in_mem, - out_mem, 0, 0, data_size, 1, - &invalid_point, nullptr, nullptr); + cl_int error = clCommandCopyBufferKHR( + command_buffer, nullptr, nullptr, in_mem, out_mem, 0, 0, data_size, + 1, &invalid_point, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandCopyBufferKHR should return " @@ -292,8 +290,8 @@ struct CommandBufferCopyBufferSyncPointsNullOrNumZero TEST_FAIL); error = clCommandCopyBufferRectKHR( - command_buffer, nullptr, in_mem, out_mem, origin, origin, region, 0, - 0, 0, 0, 1, &invalid_point, nullptr, nullptr); + command_buffer, nullptr, nullptr, in_mem, out_mem, origin, origin, + region, 0, 0, 0, 0, 1, &invalid_point, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandCopyBufferRectKHR should return " @@ -301,9 +299,9 @@ struct CommandBufferCopyBufferSyncPointsNullOrNumZero TEST_FAIL); - error = - clCommandCopyBufferKHR(command_buffer, nullptr, in_mem, out_mem, 0, - 0, data_size, 1, nullptr, nullptr, nullptr); + error = clCommandCopyBufferKHR(command_buffer, nullptr, nullptr, in_mem, + out_mem, 0, 0, data_size, 1, nullptr, + nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandCopyBufferKHR should return " @@ -312,8 +310,8 @@ struct CommandBufferCopyBufferSyncPointsNullOrNumZero error = clCommandCopyBufferRectKHR( - command_buffer, nullptr, in_mem, out_mem, origin, origin, region, 0, - 0, 0, 0, 1, nullptr, nullptr, nullptr); + command_buffer, nullptr, nullptr, in_mem, out_mem, origin, origin, + region, 0, 0, 0, 0, 1, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandCopyBufferRectKHR should return " @@ -322,13 +320,13 @@ struct CommandBufferCopyBufferSyncPointsNullOrNumZero cl_sync_point_khr point; - error = clCommandBarrierWithWaitListKHR(command_buffer, nullptr, 0, - nullptr, &point, nullptr); + error = clCommandBarrierWithWaitListKHR( + command_buffer, nullptr, nullptr, 0, nullptr, &point, nullptr); test_error(error, "clCommandBarrierWithWaitListKHR failed"); - error = - clCommandCopyBufferKHR(command_buffer, nullptr, in_mem, out_mem, 0, - 0, data_size, 0, &point, nullptr, nullptr); + error = clCommandCopyBufferKHR(command_buffer, nullptr, nullptr, in_mem, + out_mem, 0, 0, data_size, 0, &point, + nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandCopyBufferKHR should return " @@ -336,8 +334,8 @@ struct CommandBufferCopyBufferSyncPointsNullOrNumZero TEST_FAIL); error = clCommandCopyBufferRectKHR( - command_buffer, nullptr, in_mem, out_mem, origin, origin, region, 0, - 0, 0, 0, 0, &point, nullptr, nullptr); + command_buffer, nullptr, nullptr, in_mem, out_mem, origin, origin, + region, 0, 0, 0, 0, 0, &point, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandCopyBufferRectKHR should return " @@ -363,8 +361,8 @@ struct CommandBufferCopyImageSyncPointsNullOrNumZero cl_sync_point_khr invalid_point = 0; cl_int error = clCommandCopyImageToBufferKHR( - command_buffer, nullptr, image, buffer, origin, region, 0, 1, - &invalid_point, nullptr, nullptr); + command_buffer, nullptr, nullptr, image, buffer, origin, region, 0, + 1, &invalid_point, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandCopyImageToBufferKHR should return " @@ -372,9 +370,9 @@ struct CommandBufferCopyImageSyncPointsNullOrNumZero TEST_FAIL); - error = clCommandCopyImageToBufferKHR(command_buffer, nullptr, image, - buffer, origin, region, 0, 1, - nullptr, nullptr, nullptr); + error = clCommandCopyImageToBufferKHR(command_buffer, nullptr, nullptr, + image, buffer, origin, region, 0, + 1, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandCopyImageToBufferKHR should return " @@ -383,13 +381,13 @@ struct CommandBufferCopyImageSyncPointsNullOrNumZero cl_sync_point_khr point; - error = clCommandBarrierWithWaitListKHR(command_buffer, nullptr, 0, - nullptr, &point, nullptr); + error = clCommandBarrierWithWaitListKHR( + command_buffer, nullptr, nullptr, 0, nullptr, &point, nullptr); test_error(error, "clCommandBarrierWithWaitListKHR failed"); - error = clCommandCopyImageToBufferKHR(command_buffer, nullptr, image, - buffer, origin, region, 0, 0, - &point, nullptr, nullptr); + error = clCommandCopyImageToBufferKHR(command_buffer, nullptr, nullptr, + image, buffer, origin, region, 0, + 0, &point, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandCopyImageToBufferKHR should return " @@ -409,18 +407,18 @@ struct CommandBufferCopyBufferInvalidCommandBuffer cl_int Run() override { - cl_int error = - clCommandCopyBufferKHR(nullptr, nullptr, in_mem, out_mem, 0, 0, - data_size, 0, nullptr, nullptr, nullptr); + cl_int error = clCommandCopyBufferKHR(nullptr, nullptr, nullptr, in_mem, + out_mem, 0, 0, data_size, 0, + nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_COMMAND_BUFFER_KHR, "clCommandCopyBufferKHR should return " "CL_INVALID_COMMAND_BUFFER_KHR", TEST_FAIL); - error = clCommandCopyBufferRectKHR(nullptr, nullptr, in_mem, out_mem, - origin, origin, region, 0, 0, 0, 0, - 0, nullptr, nullptr, nullptr); + error = clCommandCopyBufferRectKHR( + nullptr, nullptr, nullptr, in_mem, out_mem, origin, origin, region, + 0, 0, 0, 0, 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_COMMAND_BUFFER_KHR, "clCommandCopyBufferRectKHR should return " @@ -441,8 +439,8 @@ struct CommandBufferCopyImageInvalidCommandBuffer cl_int Run() override { cl_int error = clCommandCopyImageToBufferKHR( - nullptr, nullptr, image, buffer, origin, region, 0, 0, nullptr, - nullptr, nullptr); + nullptr, nullptr, nullptr, image, buffer, origin, region, 0, 0, + nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_COMMAND_BUFFER_KHR, "clCommandCopyImageToBufferKHR should return " @@ -464,9 +462,9 @@ struct CommandBufferCopyBufferFinalizedCommandBuffer cl_int error = clFinalizeCommandBufferKHR(command_buffer); test_error(error, "clFinalizeCommandBufferKHR failed"); - error = - clCommandCopyBufferKHR(command_buffer, nullptr, in_mem, out_mem, 0, - 0, data_size, 0, nullptr, nullptr, nullptr); + error = clCommandCopyBufferKHR(command_buffer, nullptr, nullptr, in_mem, + out_mem, 0, 0, data_size, 0, nullptr, + nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_OPERATION, "clCommandCopyBufferKHR should return " @@ -475,8 +473,8 @@ struct CommandBufferCopyBufferFinalizedCommandBuffer error = clCommandCopyBufferRectKHR( - command_buffer, nullptr, in_mem, out_mem, origin, origin, region, 0, - 0, 0, 0, 0, nullptr, nullptr, nullptr); + command_buffer, nullptr, nullptr, in_mem, out_mem, origin, origin, + region, 0, 0, 0, 0, 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_OPERATION, "clCommandCopyBufferRectKHR should return " @@ -499,9 +497,9 @@ struct CommandBufferCopyImageFinalizedCommandBuffer test_error(error, "clFinalizeCommandBufferKHR failed"); - error = clCommandCopyImageToBufferKHR(command_buffer, nullptr, image, - buffer, origin, region, 0, 0, - nullptr, nullptr, nullptr); + error = clCommandCopyImageToBufferKHR(command_buffer, nullptr, nullptr, + image, buffer, origin, region, 0, + 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_OPERATION, "clCommandCopyImageToBufferKHR should return " @@ -523,8 +521,8 @@ struct CommandBufferCopyBufferMutableHandleNotNull cl_mutable_command_khr mutable_handle; cl_int error = clCommandCopyBufferKHR( - command_buffer, nullptr, in_mem, out_mem, 0, 0, data_size, 0, - nullptr, nullptr, &mutable_handle); + command_buffer, nullptr, nullptr, in_mem, out_mem, 0, 0, data_size, + 0, nullptr, nullptr, &mutable_handle); test_failure_error_ret(error, CL_INVALID_VALUE, "clCommandCopyBufferKHR should return " @@ -533,8 +531,8 @@ struct CommandBufferCopyBufferMutableHandleNotNull error = clCommandCopyBufferRectKHR( - command_buffer, nullptr, in_mem, out_mem, origin, origin, region, 0, - 0, 0, 0, 0, nullptr, nullptr, &mutable_handle); + command_buffer, nullptr, nullptr, in_mem, out_mem, origin, origin, + region, 0, 0, 0, 0, 0, nullptr, nullptr, &mutable_handle); test_failure_error_ret(error, CL_INVALID_VALUE, "clCommandCopyBufferRectKHR should return " @@ -557,8 +555,8 @@ struct CommandBufferCopyImageMutableHandleNotNull cl_mutable_command_khr mutable_handle; cl_int error = clCommandCopyImageToBufferKHR( - command_buffer, nullptr, image, buffer, origin, region, 0, 0, - nullptr, nullptr, &mutable_handle); + command_buffer, nullptr, nullptr, image, buffer, origin, region, 0, + 0, nullptr, nullptr, &mutable_handle); test_failure_error_ret(error, CL_INVALID_VALUE, "clCommandCopyImageToBufferKHR should return " diff --git a/test_conformance/extensions/cl_khr_command_buffer/negative_command_buffer_copy_image.cpp b/test_conformance/extensions/cl_khr_command_buffer/negative_command_buffer_copy_image.cpp index 80bb3b0245..a6e5af2cdf 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/negative_command_buffer_copy_image.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/negative_command_buffer_copy_image.cpp @@ -76,18 +76,19 @@ struct CommandBufferCopyImageQueueNotNull : public CommandCopyBaseTest cl_int Run() override { - cl_int error = clCommandCopyImageKHR(command_buffer, queue, src_image, - dst_image, origin, origin, region, - 0, nullptr, nullptr, nullptr); + cl_int error = clCommandCopyImageKHR( + command_buffer, queue, nullptr, src_image, dst_image, origin, + origin, region, 0, nullptr, nullptr, nullptr); + test_failure_error_ret(error, CL_INVALID_COMMAND_QUEUE, "clCommandCopyImageKHR should return " "CL_INVALID_COMMAND_QUEUE", TEST_FAIL); - error = clCommandCopyImageToBufferKHR(command_buffer, queue, src_image, - out_mem, origin, region, 0, 0, - nullptr, nullptr, nullptr); + error = clCommandCopyImageToBufferKHR( + command_buffer, queue, nullptr, src_image, out_mem, origin, region, + 0, 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_COMMAND_QUEUE, "clCommandCopyImageToBufferKHR should return " @@ -115,8 +116,8 @@ struct CommandBufferCopyImageContextNotSame : public CommandCopyBaseTest cl_int Run() override { cl_int error = clCommandCopyImageKHR( - command_buffer, nullptr, src_image_ctx, dst_image, origin, origin, - region, 0, 0, nullptr, nullptr); + command_buffer, nullptr, nullptr, src_image_ctx, dst_image, origin, + origin, region, 0, 0, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_CONTEXT, "clCommandCopyImageKHR should return " @@ -124,17 +125,17 @@ struct CommandBufferCopyImageContextNotSame : public CommandCopyBaseTest TEST_FAIL); error = clCommandCopyImageToBufferKHR( - command_buffer, nullptr, src_image_ctx, out_mem, origin, region, 0, - 0, nullptr, nullptr, nullptr); + command_buffer, nullptr, nullptr, src_image_ctx, out_mem, origin, + region, 0, 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_CONTEXT, "clCommandCopyImageToBufferKHR should return " "CL_INVALID_CONTEXT", TEST_FAIL); - error = clCommandCopyImageKHR(command_buffer, nullptr, src_image, - dst_image_ctx, origin, origin, region, 0, - nullptr, nullptr, nullptr); + error = clCommandCopyImageKHR(command_buffer, nullptr, nullptr, + src_image, dst_image_ctx, origin, origin, + region, 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_CONTEXT, "clCommandCopyImageKHR should return " @@ -142,8 +143,8 @@ struct CommandBufferCopyImageContextNotSame : public CommandCopyBaseTest TEST_FAIL); error = clCommandCopyImageToBufferKHR( - command_buffer, nullptr, src_image, dst_image_ctx, origin, region, - 0, 0, nullptr, nullptr, nullptr); + command_buffer, nullptr, nullptr, src_image, dst_image_ctx, origin, + region, 0, 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_CONTEXT, "clCommandCopyImageToBufferKHR should return " @@ -154,9 +155,9 @@ struct CommandBufferCopyImageContextNotSame : public CommandCopyBaseTest command_buffer = clCreateCommandBufferKHR(1, &queue1, 0, &error); test_error(error, "clCreateCommandBufferKHR failed"); - error = clCommandCopyImageKHR(command_buffer, nullptr, src_image, - dst_image, origin, origin, region, 0, - nullptr, nullptr, nullptr); + error = clCommandCopyImageKHR(command_buffer, nullptr, nullptr, + src_image, dst_image, origin, origin, + region, 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_CONTEXT, "clCommandCopyImageKHR should return " @@ -164,8 +165,8 @@ struct CommandBufferCopyImageContextNotSame : public CommandCopyBaseTest TEST_FAIL); error = clCommandCopyImageToBufferKHR( - command_buffer, nullptr, src_image, out_mem, origin, region, 0, 0, - nullptr, nullptr, nullptr); + command_buffer, nullptr, nullptr, src_image, out_mem, origin, + region, 0, 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_CONTEXT, "clCommandCopyImageToBufferKHR should return " @@ -216,8 +217,8 @@ struct CommandBufferCopySyncPointsNullOrNumZero : public CommandCopyBaseTest cl_sync_point_khr invalid_point = 0; cl_int error = clCommandCopyImageKHR( - command_buffer, nullptr, src_image, dst_image, origin, origin, - region, 1, &invalid_point, nullptr, nullptr); + command_buffer, nullptr, nullptr, src_image, dst_image, origin, + origin, region, 1, &invalid_point, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandCopyImageKHR should return " @@ -225,18 +226,17 @@ struct CommandBufferCopySyncPointsNullOrNumZero : public CommandCopyBaseTest TEST_FAIL); error = clCommandCopyImageToBufferKHR( - command_buffer, nullptr, src_image, out_mem, origin, region, 0, 1, - &invalid_point, nullptr, nullptr); + command_buffer, nullptr, nullptr, src_image, out_mem, origin, + region, 0, 1, &invalid_point, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandCopyImageToBufferKHR should return " "CL_INVALID_SYNC_POINT_WAIT_LIST_KHR", TEST_FAIL); - - error = clCommandCopyImageKHR(command_buffer, nullptr, src_image, - dst_image, origin, origin, region, 1, - nullptr, nullptr, nullptr); + error = clCommandCopyImageKHR(command_buffer, nullptr, nullptr, + src_image, dst_image, origin, origin, + region, 1, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandCopyImageKHR should return " @@ -244,8 +244,8 @@ struct CommandBufferCopySyncPointsNullOrNumZero : public CommandCopyBaseTest TEST_FAIL); error = clCommandCopyImageToBufferKHR( - command_buffer, nullptr, src_image, out_mem, origin, region, 0, 1, - nullptr, nullptr, nullptr); + command_buffer, nullptr, nullptr, src_image, out_mem, origin, + region, 0, 1, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandCopyImageToBufferKHR should return " @@ -254,13 +254,13 @@ struct CommandBufferCopySyncPointsNullOrNumZero : public CommandCopyBaseTest cl_sync_point_khr point; - error = clCommandBarrierWithWaitListKHR(command_buffer, nullptr, 0, - nullptr, &point, nullptr); + error = clCommandBarrierWithWaitListKHR( + command_buffer, nullptr, nullptr, 0, nullptr, &point, nullptr); test_error(error, "clCommandBarrierWithWaitListKHR failed"); - error = clCommandCopyImageKHR(command_buffer, nullptr, src_image, - dst_image, origin, origin, region, 0, - &point, nullptr, nullptr); + error = clCommandCopyImageKHR(command_buffer, nullptr, nullptr, + src_image, dst_image, origin, origin, + region, 0, &point, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandCopyImageKHR should return " @@ -268,8 +268,8 @@ struct CommandBufferCopySyncPointsNullOrNumZero : public CommandCopyBaseTest TEST_FAIL); error = clCommandCopyImageToBufferKHR( - command_buffer, nullptr, src_image, out_mem, origin, region, 0, 0, - &point, nullptr, nullptr); + command_buffer, nullptr, nullptr, src_image, out_mem, origin, + region, 0, 0, &point, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandCopyImageToBufferKHR should return " @@ -289,18 +289,18 @@ struct CommandBufferCopyImageInvalidCommandBuffer : public CommandCopyBaseTest cl_int Run() override { - cl_int error = clCommandCopyImageKHR(nullptr, nullptr, src_image, - dst_image, origin, origin, region, - 0, nullptr, nullptr, nullptr); + cl_int error = clCommandCopyImageKHR( + nullptr, nullptr, nullptr, src_image, dst_image, origin, origin, + region, 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_COMMAND_BUFFER_KHR, "clCommandCopyImageKHR should return " "CL_INVALID_COMMAND_BUFFER_KHR", TEST_FAIL); - error = clCommandCopyImageToBufferKHR(nullptr, nullptr, src_image, - out_mem, origin, region, 0, 0, - nullptr, nullptr, nullptr); + error = clCommandCopyImageToBufferKHR( + nullptr, nullptr, nullptr, src_image, out_mem, origin, region, 0, 0, + nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_COMMAND_BUFFER_KHR, "clCommandCopyImageToBufferKHR should return " @@ -322,9 +322,9 @@ struct CommandBufferCopyImageFinalizedCommandBuffer : public CommandCopyBaseTest cl_int error = clFinalizeCommandBufferKHR(command_buffer); test_error(error, "clFinalizeCommandBufferKHR failed"); - error = clCommandCopyImageKHR(command_buffer, nullptr, src_image, - dst_image, origin, origin, region, 0, - nullptr, nullptr, nullptr); + error = clCommandCopyImageKHR(command_buffer, nullptr, nullptr, + src_image, dst_image, origin, origin, + region, 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_OPERATION, "clCommandCopyImageKHR should return " @@ -332,8 +332,8 @@ struct CommandBufferCopyImageFinalizedCommandBuffer : public CommandCopyBaseTest TEST_FAIL); error = clCommandCopyImageToBufferKHR( - command_buffer, nullptr, src_image, out_mem, origin, region, 0, 0, - nullptr, nullptr, nullptr); + command_buffer, nullptr, nullptr, src_image, out_mem, origin, + region, 0, 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_OPERATION, "clCommandCopyImageToBufferKHR should return " @@ -354,8 +354,8 @@ struct CommandBufferCopyImageMutableHandleNotNull : public CommandCopyBaseTest { cl_mutable_command_khr mutable_handle; cl_int error = clCommandCopyImageKHR( - command_buffer, nullptr, src_image, dst_image, origin, origin, - region, 0, nullptr, nullptr, &mutable_handle); + command_buffer, nullptr, nullptr, src_image, dst_image, origin, + origin, region, 0, nullptr, nullptr, &mutable_handle); test_failure_error_ret(error, CL_INVALID_VALUE, "clCommandCopyImageKHR should return " @@ -363,8 +363,8 @@ struct CommandBufferCopyImageMutableHandleNotNull : public CommandCopyBaseTest TEST_FAIL); error = clCommandCopyImageToBufferKHR( - command_buffer, nullptr, src_image, out_mem, origin, region, 0, 0, - nullptr, nullptr, &mutable_handle); + command_buffer, nullptr, nullptr, src_image, out_mem, origin, + region, 0, 0, nullptr, nullptr, &mutable_handle); test_failure_error_ret(error, CL_INVALID_VALUE, "clCommandCopyImageToBufferKHR should return " diff --git a/test_conformance/extensions/cl_khr_command_buffer/negative_command_buffer_fill.cpp b/test_conformance/extensions/cl_khr_command_buffer/negative_command_buffer_fill.cpp index d8e54c22a9..23c282f060 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/negative_command_buffer_fill.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/negative_command_buffer_fill.cpp @@ -82,8 +82,8 @@ struct CommandBufferCommandFillBufferQueueNotNull cl_int Run() override { cl_int error = clCommandFillBufferKHR( - command_buffer, queue, out_mem, &pattern, sizeof(cl_int), 0, - data_size(), 0, nullptr, nullptr, nullptr); + command_buffer, queue, nullptr, out_mem, &pattern, sizeof(cl_int), + 0, data_size(), 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_COMMAND_QUEUE, "clCommandFillBufferKHR should return " @@ -109,9 +109,9 @@ struct CommandBufferCommandFillImageQueueNotNull cl_int Run() override { - cl_int error = clCommandFillImageKHR(command_buffer, queue, src_image, - fill_color_1, origin, region, 0, - nullptr, nullptr, nullptr); + cl_int error = clCommandFillImageKHR( + command_buffer, queue, nullptr, src_image, fill_color_1, origin, + region, 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_COMMAND_QUEUE, "clCommandFillImageKHR should return " @@ -139,8 +139,8 @@ struct CommandBufferCommandFillBufferContextNotSame cl_int Run() override { cl_int error = clCommandFillBufferKHR( - command_buffer, nullptr, out_mem_ctx, &pattern, sizeof(cl_int), 0, - data_size(), 0, nullptr, nullptr, nullptr); + command_buffer, nullptr, nullptr, out_mem_ctx, &pattern, + sizeof(cl_int), 0, data_size(), 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_CONTEXT, "clCommandFillBufferKHR should return " @@ -181,8 +181,8 @@ struct CommandBufferCommandFillImageContextNotSame cl_int Run() override { cl_int error = clCommandFillImageKHR( - command_buffer, nullptr, dst_image_ctx, fill_color_1, origin, - region, 0, nullptr, nullptr, nullptr); + command_buffer, nullptr, nullptr, dst_image_ctx, fill_color_1, + origin, region, 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_CONTEXT, "clCommandFillImageKHR should return " @@ -225,8 +225,8 @@ struct CommandBufferCommandFillBufferSyncPointsNullOrNumZero cl_sync_point_khr invalid_point = 0; cl_int error = clCommandFillBufferKHR( - command_buffer, nullptr, out_mem, &pattern, sizeof(cl_int), 0, - data_size(), 1, &invalid_point, nullptr, nullptr); + command_buffer, nullptr, nullptr, out_mem, &pattern, sizeof(cl_int), + 0, data_size(), 1, &invalid_point, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandFillBufferKHR should return " @@ -234,9 +234,9 @@ struct CommandBufferCommandFillBufferSyncPointsNullOrNumZero TEST_FAIL); - error = clCommandFillBufferKHR(command_buffer, nullptr, out_mem, - &pattern, sizeof(cl_int), 0, data_size(), - 1, nullptr, nullptr, nullptr); + error = clCommandFillBufferKHR( + command_buffer, nullptr, nullptr, out_mem, &pattern, sizeof(cl_int), + 0, data_size(), 1, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandFillBufferKHR should return " @@ -245,13 +245,13 @@ struct CommandBufferCommandFillBufferSyncPointsNullOrNumZero cl_sync_point_khr point; - error = clCommandBarrierWithWaitListKHR(command_buffer, nullptr, 0, - nullptr, &point, nullptr); + error = clCommandBarrierWithWaitListKHR( + command_buffer, nullptr, nullptr, 0, nullptr, &point, nullptr); test_error(error, "clCommandBarrierWithWaitListKHR failed"); - error = clCommandFillBufferKHR(command_buffer, nullptr, out_mem, - &pattern, sizeof(cl_int), 0, data_size(), - 0, &point, nullptr, nullptr); + error = clCommandFillBufferKHR( + command_buffer, nullptr, nullptr, out_mem, &pattern, sizeof(cl_int), + 0, data_size(), 0, &point, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandFillBufferKHR should return " @@ -276,9 +276,9 @@ struct CommandBufferCommandFillImageSyncPointsNullOrNumZero { cl_sync_point_khr invalid_point = 0; - cl_int error = clCommandFillImageKHR(command_buffer, nullptr, dst_image, - fill_color_1, origin, region, 1, - &invalid_point, nullptr, nullptr); + cl_int error = clCommandFillImageKHR( + command_buffer, nullptr, nullptr, dst_image, fill_color_1, origin, + region, 1, &invalid_point, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandFillImageKHR should return " @@ -286,9 +286,9 @@ struct CommandBufferCommandFillImageSyncPointsNullOrNumZero TEST_FAIL); - error = clCommandFillImageKHR(command_buffer, nullptr, dst_image, - fill_color_1, origin, region, 1, nullptr, - nullptr, nullptr); + error = clCommandFillImageKHR(command_buffer, nullptr, nullptr, + dst_image, fill_color_1, origin, region, + 1, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandFillImageKHR should return " @@ -296,14 +296,14 @@ struct CommandBufferCommandFillImageSyncPointsNullOrNumZero TEST_FAIL); cl_sync_point_khr point; - error = clCommandBarrierWithWaitListKHR(command_buffer, nullptr, 0, - nullptr, &point, nullptr); + error = clCommandBarrierWithWaitListKHR( + command_buffer, nullptr, nullptr, 0, nullptr, &point, nullptr); test_error(error, "clCommandBarrierWithWaitListKHR failed"); - error = clCommandFillImageKHR(command_buffer, nullptr, dst_image, - fill_color_1, origin, region, 0, &point, - nullptr, nullptr); + error = clCommandFillImageKHR(command_buffer, nullptr, nullptr, + dst_image, fill_color_1, origin, region, + 0, &point, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandFillImageKHR should return " @@ -326,8 +326,8 @@ struct CommandBufferCommandFillBufferInvalidCommandBuffer cl_int Run() override { cl_int error = clCommandFillBufferKHR( - nullptr, nullptr, out_mem, &pattern, sizeof(cl_int), 0, data_size(), - 0, nullptr, nullptr, nullptr); + nullptr, nullptr, nullptr, out_mem, &pattern, sizeof(cl_int), 0, + data_size(), 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_COMMAND_BUFFER_KHR, "clCommandFillBufferKHR should return " @@ -347,9 +347,9 @@ struct CommandBufferCommandFillImageInvalidCommandBuffer cl_int Run() override { - cl_int error = - clCommandFillImageKHR(nullptr, nullptr, dst_image, fill_color_1, - origin, region, 0, nullptr, nullptr, nullptr); + cl_int error = clCommandFillImageKHR( + nullptr, nullptr, nullptr, dst_image, fill_color_1, origin, region, + 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_COMMAND_BUFFER_KHR, "clCommandFillImageKHR should return " @@ -371,9 +371,9 @@ struct CommandBufferCommandFillBufferFinalizedCommandBuffer cl_int error = clFinalizeCommandBufferKHR(command_buffer); test_error(error, "clFinalizeCommandBufferKHR failed"); - error = clCommandFillBufferKHR(command_buffer, nullptr, out_mem, - &pattern, sizeof(cl_int), 0, data_size(), - 0, nullptr, nullptr, nullptr); + error = clCommandFillBufferKHR( + command_buffer, nullptr, nullptr, out_mem, &pattern, sizeof(cl_int), + 0, data_size(), 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_OPERATION, "clCommandFillBufferKHR should return " @@ -397,9 +397,9 @@ struct CommandBufferCommandFillImageFinalizedCommandBuffer test_error(error, "clFinalizeCommandBufferKHR failed"); - error = clCommandFillImageKHR(command_buffer, nullptr, dst_image, - fill_color_1, origin, region, 0, nullptr, - nullptr, nullptr); + error = clCommandFillImageKHR(command_buffer, nullptr, nullptr, + dst_image, fill_color_1, origin, region, + 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_OPERATION, "clCommandFillImageKHR should return " @@ -421,8 +421,8 @@ struct CommandBufferCommandFillBufferMutableHandleNotNull cl_mutable_command_khr mutable_handle; cl_int error = clCommandFillBufferKHR( - command_buffer, nullptr, out_mem, &pattern, sizeof(cl_int), 0, - data_size(), 0, nullptr, nullptr, &mutable_handle); + command_buffer, nullptr, nullptr, out_mem, &pattern, sizeof(cl_int), + 0, data_size(), 0, nullptr, nullptr, &mutable_handle); test_failure_error_ret(error, CL_INVALID_VALUE, "clCommandFillBufferKHR should return " @@ -444,9 +444,9 @@ struct CommandBufferCommandFillImageMutableHandleNotNull { cl_mutable_command_khr mutable_handle; - cl_int error = clCommandFillImageKHR(command_buffer, nullptr, dst_image, - fill_color_1, origin, region, 0, - nullptr, nullptr, &mutable_handle); + cl_int error = clCommandFillImageKHR( + command_buffer, nullptr, nullptr, dst_image, fill_color_1, origin, + region, 0, nullptr, nullptr, &mutable_handle); test_failure_error_ret(error, CL_INVALID_VALUE, "clCommandFillImageKHR should return " diff --git a/test_conformance/extensions/cl_khr_command_buffer/negative_command_buffer_svm_mem.cpp b/test_conformance/extensions/cl_khr_command_buffer/negative_command_buffer_svm_mem.cpp index b5d2355b2a..26f1c2577c 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/negative_command_buffer_svm_mem.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/negative_command_buffer_svm_mem.cpp @@ -29,17 +29,17 @@ struct CommandBufferCommandSVMQueueNotNull : public BasicSVMCommandBufferTest cl_int Run() override { cl_int error = clCommandSVMMemcpyKHR( - command_buffer, queue, svm_out_mem(), svm_in_mem(), data_size(), 0, - nullptr, nullptr, nullptr); + command_buffer, queue, nullptr, svm_out_mem(), svm_in_mem(), + data_size(), 0, nullptr, nullptr, nullptr); test_failure_error_ret( error, CL_INVALID_COMMAND_QUEUE, "clCommandSVMMemcpyKHR should return CL_INVALID_COMMAND_QUEUE", TEST_FAIL); - error = clCommandSVMMemFillKHR(command_buffer, queue, svm_in_mem(), - &pattern_1, sizeof(cl_char), data_size(), - 0, nullptr, nullptr, nullptr); + error = clCommandSVMMemFillKHR( + command_buffer, queue, nullptr, svm_in_mem(), &pattern_1, + sizeof(cl_char), data_size(), 0, nullptr, nullptr, nullptr); test_failure_error_ret( error, CL_INVALID_COMMAND_QUEUE, @@ -73,37 +73,33 @@ struct CommandBufferCommandSVMSyncPointsNullOrNumZero cl_sync_point_khr invalid_point = 0; cl_int error = clCommandSVMMemcpyKHR( - command_buffer, nullptr, svm_out_mem(), svm_in_mem(), data_size(), - 1, &invalid_point, nullptr, nullptr); - + command_buffer, nullptr, nullptr, svm_out_mem(), svm_in_mem(), + data_size(), 1, &invalid_point, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandSVMMemcpyKHR should return " "CL_INVALID_SYNC_POINT_WAIT_LIST_KHR", TEST_FAIL); - error = clCommandSVMMemFillKHR(command_buffer, nullptr, svm_in_mem(), - &pattern_1, sizeof(cl_char), data_size(), - 1, &invalid_point, nullptr, nullptr); - + error = clCommandSVMMemFillKHR( + command_buffer, nullptr, nullptr, svm_in_mem(), &pattern_1, + sizeof(cl_char), data_size(), 1, &invalid_point, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandSVMMemFillKHR should return " "CL_INVALID_SYNC_POINT_WAIT_LIST_KHR", TEST_FAIL); - - error = clCommandSVMMemcpyKHR(command_buffer, nullptr, svm_out_mem(), - svm_in_mem(), data_size(), 1, nullptr, - nullptr, nullptr); + error = clCommandSVMMemcpyKHR(command_buffer, nullptr, nullptr, + svm_out_mem(), svm_in_mem(), data_size(), + 1, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandSVMMemcpyKHR should return " "CL_INVALID_SYNC_POINT_WAIT_LIST_KHR", TEST_FAIL); - error = clCommandSVMMemFillKHR(command_buffer, nullptr, svm_in_mem(), - &pattern_1, sizeof(cl_char), data_size(), - 1, nullptr, nullptr, nullptr); - + error = clCommandSVMMemFillKHR( + command_buffer, nullptr, nullptr, svm_in_mem(), &pattern_1, + sizeof(cl_char), data_size(), 1, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandSVMMemFillKHR should return " "CL_INVALID_SYNC_POINT_WAIT_LIST_KHR", @@ -111,23 +107,22 @@ struct CommandBufferCommandSVMSyncPointsNullOrNumZero cl_sync_point_khr point; - error = clCommandBarrierWithWaitListKHR(command_buffer, nullptr, 0, - nullptr, &point, nullptr); + error = clCommandBarrierWithWaitListKHR( + command_buffer, nullptr, nullptr, 0, nullptr, &point, nullptr); test_error(error, "clCommandBarrierWithWaitListKHR failed"); - error = clCommandSVMMemcpyKHR(command_buffer, nullptr, svm_out_mem(), - svm_in_mem(), data_size(), 0, &point, - nullptr, nullptr); + error = clCommandSVMMemcpyKHR(command_buffer, nullptr, nullptr, + svm_out_mem(), svm_in_mem(), data_size(), + 0, &point, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandSVMMemcpyKHR should return " "CL_INVALID_SYNC_POINT_WAIT_LIST_KHR", TEST_FAIL); - error = clCommandSVMMemFillKHR(command_buffer, nullptr, svm_in_mem(), - &pattern_1, sizeof(cl_char), data_size(), - 0, &point, nullptr, nullptr); - + error = clCommandSVMMemFillKHR( + command_buffer, nullptr, nullptr, svm_in_mem(), &pattern_1, + sizeof(cl_char), data_size(), 0, &point, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandSVMMemFillKHR should return " "CL_INVALID_SYNC_POINT_WAIT_LIST_KHR", @@ -149,16 +144,16 @@ struct CommandBufferCommandSVMInvalidCommandBuffer cl_int Run() override { - cl_int error = - clCommandSVMMemcpyKHR(nullptr, nullptr, svm_out_mem(), svm_in_mem(), - data_size(), 0, nullptr, nullptr, nullptr); + cl_int error = clCommandSVMMemcpyKHR( + nullptr, nullptr, nullptr, svm_out_mem(), svm_in_mem(), data_size(), + 0, nullptr, nullptr, nullptr); test_failure_error_ret( error, CL_INVALID_COMMAND_BUFFER_KHR, "clCommandSVMMemcpyKHR should return CL_INVALID_COMMAND_BUFFER_KHR", TEST_FAIL); - error = clCommandSVMMemFillKHR(nullptr, nullptr, svm_in_mem(), + error = clCommandSVMMemFillKHR(nullptr, nullptr, nullptr, svm_in_mem(), &pattern_1, sizeof(cl_char), data_size(), 0, nullptr, nullptr, nullptr); @@ -184,19 +179,17 @@ struct CommandBufferCommandSVMFinalizedCommandBuffer cl_int error = clFinalizeCommandBufferKHR(command_buffer); test_error(error, "clFinalizeCommandBufferKHR failed"); - error = clCommandSVMMemcpyKHR(command_buffer, nullptr, svm_out_mem(), - svm_in_mem(), data_size(), 0, nullptr, - nullptr, nullptr); - + error = clCommandSVMMemcpyKHR(command_buffer, nullptr, nullptr, + svm_out_mem(), svm_in_mem(), data_size(), + 0, nullptr, nullptr, nullptr); test_failure_error_ret( error, CL_INVALID_OPERATION, "clCommandSVMMemcpyKHR should return CL_INVALID_OPERATION", TEST_FAIL); - error = clCommandSVMMemFillKHR(command_buffer, nullptr, svm_in_mem(), - &pattern_1, sizeof(cl_char), data_size(), - 0, nullptr, nullptr, nullptr); - + error = clCommandSVMMemFillKHR( + command_buffer, nullptr, nullptr, svm_in_mem(), &pattern_1, + sizeof(cl_char), data_size(), 0, nullptr, nullptr, nullptr); test_failure_error_ret( error, CL_INVALID_OPERATION, "clCommandSVMMemFillKHR should return CL_INVALID_OPERATION", @@ -219,16 +212,16 @@ struct CommandBufferCommandSVMMutableHandleNotNull cl_mutable_command_khr mutable_handle; cl_int error = clCommandSVMMemcpyKHR( - command_buffer, nullptr, svm_out_mem(), svm_in_mem(), data_size(), - 0, nullptr, nullptr, &mutable_handle); + command_buffer, nullptr, nullptr, svm_out_mem(), svm_in_mem(), + data_size(), 0, nullptr, nullptr, &mutable_handle); test_failure_error_ret( error, CL_INVALID_VALUE, "clCommandSVMMemcpyKHR should return CL_INVALID_VALUE", TEST_FAIL); - error = clCommandSVMMemFillKHR(command_buffer, nullptr, svm_in_mem(), - &pattern_1, sizeof(cl_char), data_size(), - 0, nullptr, nullptr, &mutable_handle); + error = clCommandSVMMemFillKHR( + command_buffer, nullptr, nullptr, svm_in_mem(), &pattern_1, + sizeof(cl_char), data_size(), 0, nullptr, nullptr, &mutable_handle); test_failure_error_ret( error, CL_INVALID_VALUE, diff --git a/test_conformance/extensions/cl_khr_command_buffer/negative_command_nd_range_kernel.cpp b/test_conformance/extensions/cl_khr_command_buffer/negative_command_nd_range_kernel.cpp index ccbefd85f8..2d5327717c 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/negative_command_nd_range_kernel.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/negative_command_nd_range_kernel.cpp @@ -133,10 +133,9 @@ struct CommandNDRangeKerneSyncPointsNullOrNumZero "CL_INVALID_SYNC_POINT_WAIT_LIST_KHR", TEST_FAIL); - cl_sync_point_khr point; - error = clCommandBarrierWithWaitListKHR(command_buffer, nullptr, 0, - nullptr, &point, nullptr); + error = clCommandBarrierWithWaitListKHR( + command_buffer, nullptr, nullptr, 0, nullptr, &point, nullptr); test_error(error, "clCommandBarrierWithWaitListKHR failed"); cl_sync_point_khr* sync_points[] = { &point }; @@ -182,8 +181,8 @@ struct CommandNDRangeKernelInvalidProperties : public BasicCommandBufferTest cl_int Run() override { - cl_ndrange_kernel_command_properties_khr empty_properties = - ~cl_ndrange_kernel_command_properties_khr(0); + cl_command_properties_khr empty_properties = + ~cl_command_properties_khr(0); cl_int error = clCommandNDRangeKernelKHR( command_buffer, nullptr, &empty_properties, kernel, 1, nullptr, @@ -194,7 +193,7 @@ struct CommandNDRangeKernelInvalidProperties : public BasicCommandBufferTest "CL_INVALID_VALUE", TEST_FAIL); - cl_ndrange_kernel_command_properties_khr props_invalid[3] = { + cl_command_properties_khr props_invalid[3] = { CL_MUTABLE_DISPATCH_UPDATABLE_FIELDS_KHR, CL_MEM_USE_CACHED_CPU_MEMORY_IMG, 1 };