cl20: Reuse test harness code in kernel_read_write (#241)

Some of the setup functionality is already there in the test harness, so
use that and remove the duplicated code from within the suite.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
This commit is contained in:
Radek Szymanski
2019-05-01 14:19:01 +01:00
committed by Kévin Petit
parent 3c62454f71
commit 3a8214750a
14 changed files with 103 additions and 254 deletions

View File

@@ -58,16 +58,16 @@ enum TestTypes
kAllTests = ( kReadTests | kWriteTests | kReadWriteTests )
};
typedef int (*test_format_set_fn)( cl_device_id device,
typedef int (*test_format_set_fn)( cl_device_id device, cl_context context, cl_command_queue queue,
cl_image_format *formatList, bool *filterFlags, unsigned int numFormats,
image_sampler_data *imageSampler, ExplicitType outputType,
cl_mem_object_type imageType );
extern int test_read_image_formats( cl_device_id device,
extern int test_read_image_formats( cl_device_id device, cl_context context, cl_command_queue queue,
cl_image_format *formatList, bool *filterFlags, unsigned int numFormats,
image_sampler_data *imageSampler, ExplicitType outputType,
cl_mem_object_type imageType );
extern int test_write_image_formats( cl_device_id device,
extern int test_write_image_formats( cl_device_id device, cl_context context, cl_command_queue queue,
cl_image_format *formatList, bool *filterFlags, unsigned int numFormats,
image_sampler_data *imageSampler, ExplicitType outputType,
cl_mem_object_type imageType );