Skip to content

Commit

Permalink
Added if (check_image_support) to SetUp before creating images
Browse files Browse the repository at this point in the history
  • Loading branch information
kamil-goras-mobica committed May 22, 2024
1 parent 774794d commit ac87eda
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit ac87eda

Please sign in to comment.