Skip to content
Snippets Groups Projects
Commit bbfa6461 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Fix build against CL 1.1

parent 425ca5e2
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -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=(
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment