diff --git a/Makefile.am b/Makefile.am index 2dde0c0..1f7dcd3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -106,7 +106,6 @@ libdummycl_noext_la_CPPFLAGS = $(AM_CPPFLAGS) -DICD_WITHOUT_EXTENSION libdummycl2_la_SOURCES = $(libdummycl_la_SOURCES) nodist_libdummycl2_la_SOURCES = $(nodist_libdummycl_la_SOURCES) libdummycl2_la_CPPFLAGS = $(AM_CPPFLAGS) -DICD_SUFFIX=\"2\" -libdummylayer_la_SOURCES = ocl_icd_layer.h nodist_libdummylayer_la_SOURCES = dummy_icd_layer_gen.c noinst_PROGRAMS=run_dummy_icd_through_our_ICDL diff --git a/icd_generator.rb b/icd_generator.rb index 07dd62d..bb0f2e9 100644 --- a/icd_generator.rb +++ b/icd_generator.rb @@ -344,7 +344,14 @@ def self.generate_icd_layer_source icd_layer_source = "/**\n#{$license}\n*/\n" icd_layer_source += < -#include "ocl_icd_layer.h" +#define CL_USE_DEPRECATED_OPENCL_1_0_APIS +#define CL_USE_DEPRECATED_OPENCL_1_1_APIS +#define CL_USE_DEPRECATED_OPENCL_1_2_APIS +#define CL_USE_DEPRECATED_OPENCL_2_0_APIS +#define CL_USE_DEPRECATED_OPENCL_2_1_APIS +#define CL_USE_DEPRECATED_OPENCL_2_2_APIS +#define CL_TARGET_OPENCL_VERSION 300 +#include static struct _cl_icd_dispatch dispatch = {NULL}; static const struct _cl_icd_dispatch *tdispatch; @@ -382,14 +389,14 @@ def self.generate_icd_layer_source const struct _cl_icd_dispatch *target_dispatch, cl_uint *num_entries_out, const struct _cl_icd_dispatch **layer_dispatch) { - if (!target_dispatch || !layer_dispatch ||!num_entries_out || num_entries < OCL_ICD_LAST_FUNCTION+1) + if (!target_dispatch || !layer_dispatch ||!num_entries_out || num_entries < sizeof(dispatch)/sizeof(dispatch.clGetPlatformIDs)) return -1; _init_dispatch(); tdispatch = target_dispatch; *layer_dispatch = &dispatch; - *num_entries_out = OCL_ICD_LAST_FUNCTION+1; + *num_entries_out = sizeof(dispatch)/sizeof(dispatch.clGetPlatformIDs); return CL_SUCCESS; } diff --git a/ocl_icd_layer.h b/ocl_icd_layer.h deleted file mode 100644 index 28f6093..0000000 --- a/ocl_icd_layer.h +++ /dev/null @@ -1,32 +0,0 @@ -#include "ocl_icd.h" - -typedef cl_uint cl_layer_info; -typedef cl_uint cl_layer_api_version; -#define CL_LAYER_API_VERSION 0x4240 -#define CL_LAYER_API_VERSION_100 100 - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetLayerInfo(cl_layer_info param_name, - size_t param_value_size, - void *param_value, - size_t *param_value_size_ret); - -CL_API_ENTRY typedef cl_int -(CL_API_CALL *pfn_clGetLayerInfo)(cl_layer_info param_name, - size_t param_value_size, - void *param_value, - size_t *param_value_size_ret); - -extern CL_API_ENTRY cl_int CL_API_CALL -clInitLayer(cl_uint num_entries, - const struct _cl_icd_dispatch *target_dispatch, - cl_uint *num_entries_ret, - const struct _cl_icd_dispatch **layer_dispatch_ret); - -CL_API_ENTRY typedef cl_int -(CL_API_CALL *pfn_clInitLayer)(cl_uint num_entries, - const struct _cl_icd_dispatch *target_dispatch, - cl_uint *num_entries_ret, - const struct _cl_icd_dispatch **layer_dispatch_ret); - -