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 e3c261f5b3..43b022d773 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 @@ -192,9 +192,13 @@ struct CommandBufferCopySyncPointsNullOrNumZero : public BasicCommandBufferTest cl_int Run() override { - cl_int error = clCommandCopyImageKHR(command_buffer, nullptr, src_image, - dst_image, origin, origin, region, - 1, nullptr, nullptr, nullptr); + cl_sync_point_khr invalid_point = 0; + std::vector invalid_sync_points; + invalid_sync_points.push_back(&invalid_point); + + cl_int error = clCommandCopyImageKHR( + command_buffer, nullptr, src_image, dst_image, origin, origin, + region, 1, *invalid_sync_points.data(), nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandCopyImageKHR should return " @@ -203,20 +207,17 @@ struct CommandBufferCopySyncPointsNullOrNumZero : public BasicCommandBufferTest error = clCommandCopyImageToBufferKHR( command_buffer, nullptr, src_image, dst_image, origin, origin, 0, 1, - nullptr, nullptr, nullptr); + *invalid_sync_points.data(), nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandCopyImageKHR should return " "CL_INVALID_SYNC_POINT_WAIT_LIST_KHR", TEST_FAIL); - cl_sync_point_khr point = 1; - std::vector sync_points; - sync_points.push_back(point); error = clCommandCopyImageKHR(command_buffer, nullptr, src_image, - dst_image, origin, origin, region, 0, - sync_points.data(), nullptr, nullptr); + dst_image, origin, origin, region, 1, + nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandCopyImageKHR should return " @@ -224,21 +225,25 @@ struct CommandBufferCopySyncPointsNullOrNumZero : public BasicCommandBufferTest TEST_FAIL); error = clCommandCopyImageToBufferKHR( - command_buffer, nullptr, src_image, dst_image, origin, origin, 0, 0, - sync_points.data(), nullptr, nullptr); + command_buffer, nullptr, src_image, dst_image, origin, origin, 0, 1, + nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandCopyImageKHR should return " "CL_INVALID_SYNC_POINT_WAIT_LIST_KHR", TEST_FAIL); - cl_sync_point_khr* invalid_point = nullptr; - std::vector invalid_sync_points; - invalid_sync_points.push_back(invalid_point); - error = clCommandCopyImageKHR( - command_buffer, nullptr, src_image, dst_image, origin, origin, - region, 1, *invalid_sync_points.data(), nullptr, nullptr); + cl_sync_point_khr point; + error = clCommandBarrierWithWaitListKHR(command_buffer, nullptr, 0, + nullptr, &point, nullptr); + test_error(error, "clCommandBarrierWithWaitListKHR failed"); + std::vector sync_points; + sync_points.push_back(point); + + error = clCommandCopyImageKHR(command_buffer, nullptr, src_image, + dst_image, origin, origin, region, 0, + sync_points.data(), nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandCopyImageKHR should return " @@ -246,8 +251,8 @@ struct CommandBufferCopySyncPointsNullOrNumZero : public BasicCommandBufferTest TEST_FAIL); error = clCommandCopyImageToBufferKHR( - command_buffer, nullptr, src_image, dst_image, origin, origin, 0, 1, - *invalid_sync_points.data(), nullptr, nullptr); + command_buffer, nullptr, src_image, dst_image, origin, origin, 0, 0, + sync_points.data(), nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, "clCommandCopyImageKHR should return "