Refactor clCopyImage and clFillImage tests (#2283)

This change mainly extends `clFillImage` and `clCopyImage` test function
to include memory flags to be used during creating the image instead of
hard-coding these values. The memory flags are also different parameters
for source and destination images in `clCopyImage` tests.

---------

Signed-off-by: Michael Rizkalla <michael.rizkalla@arm.com>
This commit is contained in:
Michael Rizkalla
2025-04-01 17:53:37 +01:00
committed by GitHub
parent 78bd3ddece
commit 5930d45fc6
19 changed files with 1762 additions and 1043 deletions

View File

@@ -71,6 +71,7 @@ int test_fill_image_size_1D_buffer(cl_context context, cl_command_queue queue,
int test_fill_image_set_1D_buffer(cl_device_id device, cl_context context,
cl_command_queue queue,
cl_image_format *format,
cl_mem_flags mem_flags,
ExplicitType outputType)
{
size_t maxWidth;
@@ -84,6 +85,7 @@ int test_fill_image_set_1D_buffer(cl_device_id device, cl_context context,
memset(&imageInfo, 0x0, sizeof(image_descriptor));
imageInfo.type = CL_MEM_OBJECT_IMAGE1D_BUFFER;
imageInfo.format = format;
imageInfo.mem_flags = mem_flags;
pixelSize = get_pixel_size(imageInfo.format);
int error = clGetDeviceInfo(device, CL_DEVICE_IMAGE_MAX_BUFFER_SIZE,