diff --git a/src/wrapper/wrap_cl.hpp b/src/wrapper/wrap_cl.hpp index b12286c9d737684ae7a60039a357bf73bfd894d9..e001d907f11eb8e731c8de057446ac57c0ec6ba2 100644 --- a/src/wrapper/wrap_cl.hpp +++ b/src/wrapper/wrap_cl.hpp @@ -10,7 +10,8 @@ // Mac ------------------------------------------------------------------------ #include <OpenCL/opencl.h> #ifdef HAVE_GL -#include <OpenCL/opencl_gl.h> +#include <OpenCL/cl_gl.h> +#include <OpenCL/cl_gl_ext.h> #endif #else @@ -2639,7 +2640,7 @@ namespace pyopencl std::vector<size_t> local_work_size; if (py_local_work_size.ptr() != Py_None) { - if (work_dim != len(py_local_work_size)) + if (work_dim != unsigned(len(py_local_work_size))) throw error("enqueue_nd_range_kernel", CL_INVALID_VALUE, "global/work work sizes have differing dimensions"); @@ -2652,7 +2653,7 @@ namespace pyopencl std::vector<size_t> global_work_offset; if (py_global_work_offset.ptr() != Py_None) { - if (work_dim != len(py_global_work_offset)) + if (work_dim != unsigned(len(py_global_work_offset))) throw error("enqueue_nd_range_kernel", CL_INVALID_VALUE, "global work size and offset have differing dimensions"); diff --git a/src/wrapper/wrap_cl_part_2.cpp b/src/wrapper/wrap_cl_part_2.cpp index 80a39472b4ca21e2623c11786252ab1e7085984f..6db594b9bee6a1c9830738a3636b8659b7c805ec 100644 --- a/src/wrapper/wrap_cl_part_2.cpp +++ b/src/wrapper/wrap_cl_part_2.cpp @@ -229,8 +229,10 @@ void pyopencl_expose_part_2() ), py::return_value_policy<py::manage_new_object>()); +#if defined(cl_khr_gl_sharing) && (cl_khr_gl_sharing >= 1) py::def("get_gl_context_info_khr", get_gl_context_info_khr, py::args("properties", "param_name")); +#endif #endif // }}}