mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
kernel_image_methods: Fix size checks in 1Dbuffer case (#2106)
Image height is initialized to 0. But the size calculation should assume a height of 1.
This commit is contained in:
@@ -262,8 +262,7 @@ int test_get_image_info_1D_buffer(cl_device_id device, cl_context context,
|
||||
imageInfo.rowPitch += extraWidth;
|
||||
} while ((imageInfo.rowPitch % pixelSize) != 0);
|
||||
|
||||
size = (cl_ulong)imageInfo.rowPitch * (cl_ulong)imageInfo.height
|
||||
* 4;
|
||||
size = (cl_ulong)imageInfo.rowPitch * 4;
|
||||
} while (size > maxAllocSize || (size * 3) > memSize);
|
||||
|
||||
if (gDebugTrace)
|
||||
|
||||
Reference in New Issue
Block a user