Skip to content

Commit

Permalink
Fix 1D buffer image tests (#2073)
Browse files Browse the repository at this point in the history
Buffer size needs to be greater than or equal the image row pitch which
was not the case.
  • Loading branch information
ahesham-arm authored Sep 24, 2024
1 parent 1cede6d commit 0c7fbc4
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ static int test_get_1Dimage_buffer_info_single(cl_context context,
if (gDebugTrace)
log_info(" - Creating 1D image %d ...\n", (int)imageInfo->width);

buffer = clCreateBuffer(
context, flags, imageInfo->width * get_pixel_size(imageInfo->format),
NULL, &error);
buffer = clCreateBuffer(context, flags, imageInfo->rowPitch, NULL, &error);
if (error != CL_SUCCESS)
{
log_error("ERROR: Unable to create buffer for 1D image buffer of size "
Expand Down

0 comments on commit 0c7fbc4

Please sign in to comment.