mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Deduplicate create_image from Copy/Fill image tests (#2262)
1. Remove duplicate `create_image` code that is in both clFillImage and clCopyImage test directories. 2. Unify how pitch buffer's memory is deallocated; The buffer can be allocated with either `malloc` or `align_malloc` and the free function is pre-set in `pitch_buffe_data`'s member variable `free_fn` and used when the buffer is deallocated. With this, the change removes `is_aligned` conditional variable that was used to select the appropriate free function. Signed-off-by: Michael Rizkalla <michael.rizkalla@arm.com>
This commit is contained in:
@@ -50,4 +50,9 @@ int get_format_list(cl_context context, cl_mem_object_type imageType,
|
||||
cl_mem_flags flags);
|
||||
size_t random_in_ranges(size_t minimum, size_t rangeA, size_t rangeB, MTdata d);
|
||||
|
||||
clMemWrapper create_image(cl_context context, cl_command_queue queue,
|
||||
BufferOwningPtr<char> &data,
|
||||
image_descriptor *imageInfo, bool enable_pitch,
|
||||
bool create_mipmaps, int *error);
|
||||
|
||||
#endif // IMAGES_COMMON_H
|
||||
|
||||
Reference in New Issue
Block a user