mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
fix test_api min_max_image_buffer_size (#2342)
print a `log_info` and use the minimum value (`1`) for `pixelBytes` instead of printing an error and returning with an error value. It allows device exposing a big CL_DEVICE_IMAGE_MAX_BUFFER_SIZE (more than CL_DEVICE_MAX_MEM_ALLOC_SIZE/2) to pass test_api min_max_image_buffer_size Fix #2245
This commit is contained in:
@@ -1088,10 +1088,12 @@ REGISTER_TEST(min_max_image_buffer_size)
|
|||||||
pixelBytes = maxAllocSize / maxDimensionPixels;
|
pixelBytes = maxAllocSize / maxDimensionPixels;
|
||||||
if (pixelBytes == 0)
|
if (pixelBytes == 0)
|
||||||
{
|
{
|
||||||
log_error("Value of CL_DEVICE_IMAGE_MAX_BUFFER_SIZE is greater than "
|
log_info(
|
||||||
"CL_MAX_MEM_ALLOC_SIZE so there is no way to allocate image "
|
"Note, the value of CL_DEVICE_IMAGE_MAX_BUFFER_SIZE is %zu pixels, "
|
||||||
"of maximum size!\n");
|
"therefore the size of the allocated image may be larger than the "
|
||||||
return -1;
|
"scaled CL_DEVICE_MAX_MEM_ALLOC_SIZE of %" PRIu64 " bytes.\n",
|
||||||
|
maxDimensionPixels, maxAllocSize);
|
||||||
|
pixelBytes = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
error = -1;
|
error = -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user