mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-22 23:29:02 +00:00
Use old-style sampler creation in basic suite and remove duplicate compatibility tests (#510)
As agreed in the WG calls, the query tests are sufficient to cover both old-style and new-style sampler and command queue creation entrypoints. Use old-style entrypoints in all tests that don't require 2.x features to get compatibility with 1.x implementations. This makes it possible to remove duplicate compatibility tests. Contributes to #494. Signed-off-by: Kévin Petit <kpet@free.fr>
This commit is contained in:
@@ -117,13 +117,8 @@ test_imagedim_pow2(cl_device_id device, cl_context context, cl_command_queue que
|
||||
max_mem_size = (cl_ulong)SIZE_MAX;
|
||||
}
|
||||
|
||||
cl_sampler_properties properties[] = {
|
||||
CL_SAMPLER_NORMALIZED_COORDS, CL_FALSE,
|
||||
CL_SAMPLER_ADDRESSING_MODE, CL_ADDRESS_CLAMP_TO_EDGE,
|
||||
CL_SAMPLER_FILTER_MODE, CL_FILTER_NEAREST,
|
||||
0 };
|
||||
cl_sampler sampler = clCreateSamplerWithProperties(context, properties, &err);
|
||||
test_error(err, "clCreateSamplerWithProperties failed");
|
||||
cl_sampler sampler = clCreateSampler(context, CL_FALSE, CL_ADDRESS_CLAMP_TO_EDGE, CL_FILTER_NEAREST, &err);
|
||||
test_error(err, "clCreateSampler failed");
|
||||
|
||||
max_img_width = (int)max_image2d_width;
|
||||
max_img_height = (int)max_image2d_height;
|
||||
@@ -154,9 +149,9 @@ test_imagedim_pow2(cl_device_id device, cl_context context, cl_command_queue que
|
||||
log_info("Adjusted maximum image size to test is %d x %d, which is a max mem size of %gMB.\n",
|
||||
max_img_width, max_img_height, (max_img_width*max_img_height*4)/(1024.0*1024.0));
|
||||
|
||||
d = init_genrand( gRandomSeed );
|
||||
input_ptr = generate_8888_image(max_img_width, max_img_height, d);
|
||||
output_ptr = (unsigned char*)malloc(sizeof(unsigned char) * 4 * max_img_width * max_img_height);
|
||||
d = init_genrand( gRandomSeed );
|
||||
input_ptr = generate_8888_image(max_img_width, max_img_height, d);
|
||||
output_ptr = (unsigned char*)malloc(sizeof(unsigned char) * 4 * max_img_width * max_img_height);
|
||||
|
||||
// test power of 2 width, height starting at 1 to 4K
|
||||
for (i=1,i2=0; i<=max_img_height; i<<=1,i2++)
|
||||
@@ -328,13 +323,8 @@ test_imagedim_non_pow2(cl_device_id device, cl_context context, cl_command_queue
|
||||
log_info("Device reported max image sizes of %lu x %lu, and max mem size of %gMB.\n",
|
||||
max_image2d_width, max_image2d_height, max_mem_size/(1024.0*1024.0));
|
||||
|
||||
cl_sampler_properties properties[] = {
|
||||
CL_SAMPLER_NORMALIZED_COORDS, CL_FALSE,
|
||||
CL_SAMPLER_ADDRESSING_MODE, CL_ADDRESS_CLAMP_TO_EDGE,
|
||||
CL_SAMPLER_FILTER_MODE, CL_FILTER_NEAREST,
|
||||
0 };
|
||||
cl_sampler sampler = clCreateSamplerWithProperties(context, properties, &err);
|
||||
test_error(err, "clCreateSamplerWithProperties failed");
|
||||
cl_sampler sampler = clCreateSampler(context, CL_FALSE, CL_ADDRESS_CLAMP_TO_EDGE, CL_FILTER_NEAREST, &err);
|
||||
test_error(err, "clCreateSampler failed");
|
||||
|
||||
max_img_width = (int)max_image2d_width;
|
||||
max_img_height = (int)max_image2d_height;
|
||||
|
||||
Reference in New Issue
Block a user