Test IMAGE1D_BUFFER in more scenario (#1806)

* cl_copy_images

* cl_get_info

* cl_fill_image

* cl_read_write_image

* kernel_image_methods

* IMAGE1D_BUFFER cannot be created with (USE_|ALLOC_|COPY_)_HOST_PTR

* do not allow mipmap with 1D buffer

* adjust M to be within maximum_sizes and max_pixels

* remove unused variables

* make sure M will never be 0

* fix region[0] after refactoring removing mipmap

* fix formatting

* format with clang-format-11

* fix image1d_buffer creation with gEnablePitch

* add missing case in switch

* use align_malloc when CL version is at least 2.0

* use CL_DEVICE_NUMERIC_VERSION and align_free

* fix free of pitch buffer

* fix formatting

* fix formatting

* fix data->is_aligned
This commit is contained in:
Romaric Jodin
2024-04-16 17:48:05 +02:00
committed by GitHub
parent 7fa567c7a5
commit be8b56d949
25 changed files with 1838 additions and 87 deletions

View File

@@ -23,6 +23,11 @@ extern int test_fill_image_set_2D( cl_device_id device, cl_context context, cl_c
extern int test_fill_image_set_3D( cl_device_id device, cl_context context, cl_command_queue queue, cl_image_format *format, ExplicitType outputType );
extern int test_fill_image_set_1D_array( cl_device_id device, cl_context context, cl_command_queue queue, cl_image_format *format, ExplicitType outputType );
extern int test_fill_image_set_2D_array( cl_device_id device, cl_context context, cl_command_queue queue, cl_image_format *format, ExplicitType outputType );
extern int test_fill_image_set_1D_buffer(cl_device_id device,
cl_context context,
cl_command_queue queue,
cl_image_format *format,
ExplicitType outputType);
typedef int (*test_func)(cl_device_id device, cl_context context,
cl_command_queue queue, cl_image_format *format,
ExplicitType outputType);
@@ -60,6 +65,11 @@ int test_image_type( cl_device_id device, cl_context context, cl_command_queue q
imageType = CL_MEM_OBJECT_IMAGE3D;
test_fn = &test_fill_image_set_3D;
break;
case k1DBuffer:
name = "1D Image Buffer Fill";
imageType = CL_MEM_OBJECT_IMAGE1D_BUFFER;
test_fn = &test_fill_image_set_1D_buffer;
break;
default: log_error("Unhandled method\n"); return -1;
}