Fix 1D buffer image tests (#2073)

Buffer size needs to be greater than or equal the image row pitch which
was not the case.
This commit is contained in:
Ahmed Hesham
2024-09-24 16:53:00 +01:00
committed by GitHub
parent 1cede6dc2b
commit 0c7fbc46e6

View File

@@ -67,9 +67,7 @@ static int test_get_1Dimage_buffer_info_single(cl_context context,
if (gDebugTrace) if (gDebugTrace)
log_info(" - Creating 1D image %d ...\n", (int)imageInfo->width); log_info(" - Creating 1D image %d ...\n", (int)imageInfo->width);
buffer = clCreateBuffer( buffer = clCreateBuffer(context, flags, imageInfo->rowPitch, NULL, &error);
context, flags, imageInfo->width * get_pixel_size(imageInfo->format),
NULL, &error);
if (error != CL_SUCCESS) if (error != CL_SUCCESS)
{ {
log_error("ERROR: Unable to create buffer for 1D image buffer of size " log_error("ERROR: Unable to create buffer for 1D image buffer of size "