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 c5e116f85c..75615aa72e 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 @@ -30,13 +30,16 @@ struct CommandBufferCopyBaseTest : BasicCommandBufferTest cl_int error = BasicCommandBufferTest::SetUp(elements); test_error(error, "BasicCommandBufferTest::SetUp failed"); - image = create_image_2d(context, CL_MEM_READ_WRITE, &formats, 512, 512, - 0, NULL, &error); - test_error(error, "create_image_2d failed"); + if (check_image_support) + { + image = create_image_2d(context, CL_MEM_READ_WRITE, &formats, 512, + 512, 0, NULL, &error); + test_error(error, "create_image_2d failed"); - buffer = clCreateBuffer(context, CL_MEM_READ_WRITE, data_size(), - nullptr, &error); - test_error(error, "Unable to create buffer"); + buffer = clCreateBuffer(context, CL_MEM_READ_WRITE, data_size(), + nullptr, &error); + test_error(error, "Unable to create buffer"); + } return CL_SUCCESS; }