mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
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:
@@ -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 "
|
||||||
|
|||||||
Reference in New Issue
Block a user