mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Use highest OpenCL C version (#1081)
* Set the highest supported OpenCL C version. * Remove gDeviceLt20 variable - not used anymore. * Fix formatting issues
This commit is contained in:
committed by
GitHub
parent
f02cbad2e3
commit
2597027737
@@ -36,7 +36,6 @@ int gTypesToTest;
|
||||
cl_channel_type gChannelTypeToUse = (cl_channel_type)-1;
|
||||
cl_channel_order gChannelOrderToUse = (cl_channel_order)-1;
|
||||
bool gEnablePitch = false;
|
||||
bool gDeviceLt20 = false;
|
||||
|
||||
static void printUsage( const char *execName );
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include <setjmp.h>
|
||||
#endif
|
||||
|
||||
extern bool gDeviceLt20;
|
||||
extern bool gTestReadWrite;
|
||||
|
||||
const char *read2DKernelSourcePattern =
|
||||
@@ -254,7 +253,8 @@ int test_read_image_set_2D( cl_device_id device, cl_context context, cl_command_
|
||||
}
|
||||
|
||||
ptr = programSrc;
|
||||
error = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &ptr, "sample_kernel", gDeviceLt20 ? "" : "-cl-std=CL2.0" );
|
||||
error = create_single_kernel_helper(context, &program, &kernel, 1, &ptr,
|
||||
"sample_kernel");
|
||||
test_error( error, "Unable to create testing kernel" );
|
||||
|
||||
if ( gTestSmallImages )
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#include "../common.h"
|
||||
|
||||
extern int gTypesToTest;
|
||||
extern bool gDeviceLt20;
|
||||
extern bool gTestReadWrite;
|
||||
|
||||
extern int test_read_image_set_1D( cl_device_id device, cl_context context, cl_command_queue queue, cl_image_format *format, image_sampler_data *imageSampler, ExplicitType outputType );
|
||||
@@ -99,10 +98,6 @@ int test_image_set( cl_device_id device, cl_context context, cl_command_queue qu
|
||||
cl_image_format *formatList;
|
||||
bool *filterFlags;
|
||||
unsigned int numFormats;
|
||||
auto version = get_device_cl_version(device);
|
||||
if (version < Version(2, 0)) {
|
||||
gDeviceLt20 = true;
|
||||
}
|
||||
|
||||
if (gTestReadWrite && checkForReadWriteImageSupport(device))
|
||||
{
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include <setjmp.h>
|
||||
#endif
|
||||
|
||||
extern bool gDeviceLt20;
|
||||
extern bool gTestReadWrite;
|
||||
|
||||
const char *read1DKernelSourcePattern =
|
||||
@@ -252,7 +251,8 @@ int test_read_image_set_1D( cl_device_id device, cl_context context, cl_command_
|
||||
|
||||
|
||||
ptr = programSrc;
|
||||
error = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &ptr, "sample_kernel", gDeviceLt20 ? "" : "-cl-std=CL2.0" );
|
||||
error = create_single_kernel_helper(context, &program, &kernel, 1, &ptr,
|
||||
"sample_kernel");
|
||||
test_error( error, "Unable to create testing kernel" );
|
||||
|
||||
if ( gTestSmallImages )
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include <setjmp.h>
|
||||
#endif
|
||||
|
||||
extern bool gDeviceLt20;
|
||||
extern bool gTestReadWrite;
|
||||
|
||||
const char *read1DArrayKernelSourcePattern =
|
||||
@@ -251,7 +250,8 @@ int test_read_image_set_1D_array( cl_device_id device, cl_context context, cl_co
|
||||
|
||||
|
||||
ptr = programSrc;
|
||||
error = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &ptr, "sample_kernel", gDeviceLt20 ? "" : "-cl-std=CL2.0" );
|
||||
error = create_single_kernel_helper(context, &program, &kernel, 1, &ptr,
|
||||
"sample_kernel");
|
||||
test_error( error, "Unable to create testing kernel" );
|
||||
|
||||
if ( gTestSmallImages )
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include <setjmp.h>
|
||||
#endif
|
||||
|
||||
extern bool gDeviceLt20;
|
||||
|
||||
const char *read1DBufferKernelSourcePattern =
|
||||
"__kernel void sample_kernel( read_only image1d_buffer_t inputA, read_only image1d_t inputB, sampler_t sampler, __global int *results )\n"
|
||||
@@ -244,7 +243,8 @@ int test_read_image_set_1D_buffer( cl_device_id device, cl_context context, cl_c
|
||||
readFormat );
|
||||
|
||||
ptr = programSrc;
|
||||
error = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &ptr, "sample_kernel", gDeviceLt20 ? "" : "-cl-std=CL2.0" );
|
||||
error = create_single_kernel_helper(context, &program, &kernel, 1, &ptr,
|
||||
"sample_kernel");
|
||||
test_error( error, "Unable to create testing kernel" );
|
||||
|
||||
if ( gTestSmallImages )
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#include "../testBase.h"
|
||||
#include <float.h>
|
||||
|
||||
extern bool gDeviceLt20;
|
||||
extern bool gTestReadWrite;
|
||||
|
||||
const char *read2DArrayKernelSourcePattern =
|
||||
@@ -241,7 +240,8 @@ int test_read_image_set_2D_array( cl_device_id device, cl_context context, cl_co
|
||||
|
||||
|
||||
ptr = programSrc;
|
||||
error = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &ptr, "sample_kernel", gDeviceLt20 ? "" : "-cl-std=CL2.0" );
|
||||
error = create_single_kernel_helper(context, &program, &kernel, 1, &ptr,
|
||||
"sample_kernel");
|
||||
test_error( error, "Unable to create testing kernel" );
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#include "../testBase.h"
|
||||
#include <float.h>
|
||||
|
||||
extern bool gDeviceLt20;
|
||||
extern bool gTestReadWrite;
|
||||
|
||||
const char *read3DKernelSourcePattern =
|
||||
@@ -244,7 +243,8 @@ int test_read_image_set_3D( cl_device_id device, cl_context context, cl_command_
|
||||
|
||||
|
||||
ptr = programSrc;
|
||||
error = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &ptr, "sample_kernel", gDeviceLt20 ? "" : "-cl-std=CL2.0" );
|
||||
error = create_single_kernel_helper(context, &program, &kernel, 1, &ptr,
|
||||
"sample_kernel");
|
||||
test_error( error, "Unable to create testing kernel" );
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user