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 14f828cd5d..41e5e14ece 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 @@ -37,6 +37,12 @@ struct CommandBufferBarrierNotNullQueue : public BasicCommandBufferTest return CL_SUCCESS; } + + bool Skip() override + { + return is_extension_available(device, + "cl_khr_command_buffer_multi_device"); + } }; // CL_INVALID_COMMAND_BUFFER_KHR if command_buffer is not a valid 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 843c0d54e1..80bb3b0245 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 @@ -28,15 +28,20 @@ struct CommandCopyBaseTest : BasicCommandBufferTest cl_int SetUp(int elements) override { + num_elements = elements; + origin[0] = origin[1] = origin[2] = 0; + region[0] = elements / 64; + region[1] = 64; + region[2] = 1; cl_int error = BasicCommandBufferTest::SetUp(elements); test_error(error, "BasicCommandBufferTest::SetUp failed"); - src_image = create_image_2d(context, CL_MEM_READ_ONLY, &formats, 512, - 512, 0, NULL, &error); + src_image = create_image_2d(context, CL_MEM_READ_ONLY, &formats, + elements / 64, 64, 0, NULL, &error); test_error(error, "create_image_2d failed"); - dst_image = create_image_2d(context, CL_MEM_WRITE_ONLY, &formats, 512, - 512, 0, NULL, &error); + dst_image = create_image_2d(context, CL_MEM_WRITE_ONLY, &formats, + elements / 64, 64, 0, NULL, &error); test_error(error, "create_image_2d failed"); return CL_SUCCESS; @@ -58,8 +63,8 @@ struct CommandCopyBaseTest : BasicCommandBufferTest clMemWrapper src_image; clMemWrapper dst_image; const cl_image_format formats = { CL_RGBA, CL_UNSIGNED_INT8 }; - const size_t origin[3] = { 0, 0, 0 }; - const size_t region[3] = { 512, 512, 1 }; + size_t origin[3]; + size_t region[3]; }; namespace { @@ -81,7 +86,7 @@ struct CommandBufferCopyImageQueueNotNull : public CommandCopyBaseTest TEST_FAIL); error = clCommandCopyImageToBufferKHR(command_buffer, queue, src_image, - dst_image, origin, region, 0, 0, + out_mem, origin, region, 0, 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_COMMAND_QUEUE, @@ -119,8 +124,8 @@ struct CommandBufferCopyImageContextNotSame : public CommandCopyBaseTest TEST_FAIL); error = clCommandCopyImageToBufferKHR( - command_buffer, nullptr, src_image_ctx, dst_image, origin, region, - 0, 0, nullptr, nullptr, nullptr); + command_buffer, nullptr, src_image_ctx, out_mem, origin, region, 0, + 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_CONTEXT, "clCommandCopyImageToBufferKHR should return " @@ -159,7 +164,7 @@ struct CommandBufferCopyImageContextNotSame : public CommandCopyBaseTest TEST_FAIL); error = clCommandCopyImageToBufferKHR( - command_buffer, nullptr, src_image, dst_image, origin, region, 0, 0, + command_buffer, nullptr, src_image, out_mem, origin, region, 0, 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_CONTEXT, @@ -179,11 +184,11 @@ struct CommandBufferCopyImageContextNotSame : public CommandCopyBaseTest test_error(error, "Failed to create context"); src_image_ctx = create_image_2d(context1, CL_MEM_READ_ONLY, &formats, - 512, 512, 0, NULL, &error); + elements / 64, 64, 0, NULL, &error); test_error(error, "create_image_2d failed"); dst_image_ctx = create_image_2d(context1, CL_MEM_WRITE_ONLY, &formats, - 512, 512, 0, NULL, &error); + elements / 64, 64, 0, NULL, &error); test_error(error, "create_image_2d failed"); queue1 = clCreateCommandQueue(context1, device, 0, &error); @@ -220,7 +225,7 @@ struct CommandBufferCopySyncPointsNullOrNumZero : public CommandCopyBaseTest TEST_FAIL); error = clCommandCopyImageToBufferKHR( - command_buffer, nullptr, src_image, dst_image, origin, region, 0, 1, + command_buffer, 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, @@ -239,7 +244,7 @@ struct CommandBufferCopySyncPointsNullOrNumZero : public CommandCopyBaseTest TEST_FAIL); error = clCommandCopyImageToBufferKHR( - command_buffer, nullptr, src_image, dst_image, origin, region, 0, 1, + command_buffer, nullptr, src_image, out_mem, origin, region, 0, 1, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, @@ -263,7 +268,7 @@ struct CommandBufferCopySyncPointsNullOrNumZero : public CommandCopyBaseTest TEST_FAIL); error = clCommandCopyImageToBufferKHR( - command_buffer, nullptr, src_image, dst_image, origin, region, 0, 0, + command_buffer, nullptr, src_image, out_mem, origin, region, 0, 0, &point, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, @@ -294,7 +299,7 @@ struct CommandBufferCopyImageInvalidCommandBuffer : public CommandCopyBaseTest TEST_FAIL); error = clCommandCopyImageToBufferKHR(nullptr, nullptr, src_image, - dst_image, origin, region, 0, 0, + out_mem, origin, region, 0, 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_COMMAND_BUFFER_KHR, @@ -327,7 +332,7 @@ struct CommandBufferCopyImageFinalizedCommandBuffer : public CommandCopyBaseTest TEST_FAIL); error = clCommandCopyImageToBufferKHR( - command_buffer, nullptr, src_image, dst_image, origin, region, 0, 0, + command_buffer, nullptr, src_image, out_mem, origin, region, 0, 0, nullptr, nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_OPERATION, @@ -358,7 +363,7 @@ struct CommandBufferCopyImageMutableHandleNotNull : public CommandCopyBaseTest TEST_FAIL); error = clCommandCopyImageToBufferKHR( - command_buffer, nullptr, src_image, dst_image, origin, region, 0, 0, + command_buffer, nullptr, src_image, out_mem, origin, region, 0, 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_buffer_svm_mem.cpp b/test_conformance/extensions/cl_khr_command_buffer/negative_command_buffer_svm_mem.cpp index 4d4e2cfb77..77f4494497 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 @@ -50,6 +50,12 @@ struct CommandBufferCommandSVMQueueNotNull : public BasicSVMCommandBufferTest } const cl_char pattern_1 = 0x14; + + bool Skip() override + { + return is_extension_available(device, + "cl_khr_command_buffer_multi_device"); + } }; // CL_INVALID_SYNC_POINT_WAIT_LIST_KHR if sync_point_wait_list is NULL and 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 e44e38c09c..a4762e3369 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 @@ -38,6 +38,12 @@ struct CommandNDRangeKernelQueueNotNull : public BasicCommandBufferTest return CL_SUCCESS; } + + bool Skip() override + { + return is_extension_available(device, + "cl_khr_command_buffer_multi_device"); + } }; // CL_INVALID_CONTEXT if the context associated with command_queue, @@ -108,7 +114,7 @@ struct CommandNDRangeKerneSyncPointsNullOrNumZero cl_sync_point_khr invalid_point = 0; cl_sync_point_khr* invalid_sync_points[] = { &invalid_point }; cl_int error = clCommandNDRangeKernelKHR( - command_buffer, nullptr, nullptr, kernel, 0, nullptr, &num_elements, + command_buffer, nullptr, nullptr, kernel, 1, nullptr, &num_elements, nullptr, 1, invalid_sync_points[0], nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, @@ -134,7 +140,7 @@ struct CommandNDRangeKerneSyncPointsNullOrNumZero cl_sync_point_khr* sync_points[] = { &point }; error = clCommandNDRangeKernelKHR( - command_buffer, nullptr, nullptr, kernel, 0, nullptr, &num_elements, + command_buffer, nullptr, nullptr, kernel, 1, nullptr, &num_elements, nullptr, 0, sync_points[0], nullptr, nullptr); test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR,