diff --git a/cffi_build.py.in b/cffi_build.py.in index d7cdbee06c9e96854ab2464ad90d0ecb9b416454..d77594052077c1a17783b0e38c99a6842a357933 100644 --- a/cffi_build.py.in +++ b/cffi_build.py.in @@ -48,30 +48,7 @@ if {CL_ENABLE_GL}: ffi.set_source("pyopencl._cffi", """ - #ifndef __APPLE__ - #include <CL/cl.h> - - #ifdef HAVE_GL - #include <GL/gl.h> - #include <CL/cl_gl.h> - #include <CL/cl_gl_ext.h> - #endif - #else - #include <OpenCL/opencl.h> - - #ifdef HAVE_GL - #include <OpenGL/OpenGL.h> - #include <OpenCL/cl_gl.h> - #include <OpenCL/cl_gl_ext.h> - #endif - #endif - - extern "C" {{ - #include <wrap_cl_core.h> - #ifdef HAVE_GL - #include <wrap_cl_gl_core.h> - #endif - }} + #include "wrap_cl.h" """, define_macros=list({EXTRA_DEFINES}.items()), include_dirs=( diff --git a/src/c_wrapper/wrap_cl.h b/src/c_wrapper/wrap_cl.h index 58acc50572e6994bb0132869f615904997b4ded3..41e57c262ed6615817d39a4ffd523425345f362c 100644 --- a/src/c_wrapper/wrap_cl.h +++ b/src/c_wrapper/wrap_cl.h @@ -79,7 +79,20 @@ typedef cl_uint cl_kernel_exec_info; #ifndef CL_VERSION_1_2 typedef intptr_t cl_device_partition_property; typedef cl_uint cl_kernel_arg_info; -typedef struct _cl_image_desc cl_image_desc; + +typedef struct _cl_image_desc { + cl_mem_object_type image_type; + size_t image_width; + size_t image_height; + size_t image_depth; + size_t image_array_size; + size_t image_row_pitch; + size_t image_slice_pitch; + cl_uint num_mip_levels; + cl_uint num_samples; + cl_mem buffer; +} cl_image_desc; + typedef cl_bitfield cl_mem_migration_flags; #endif @@ -87,10 +100,6 @@ typedef cl_bitfield cl_mem_migration_flags; typedef cl_bitfield cl_mem_migration_flags_ext; #endif -#ifndef cl_ext_device_fission -typedef cl_ulong cl_device_partition_property_ext; -#endif - struct clbase; typedef clbase *clobj_t;