diff --git a/doc/make_constants.py b/doc/make_constants.py index 0f78f019fde7342f00e629b52a422174cb54cd7c..45a3009ff0d76650d0cf21cb907bf8ab8334b899 100644 --- a/doc/make_constants.py +++ b/doc/make_constants.py @@ -251,6 +251,11 @@ const_ext_lookup = { "INTEROP_USER_SYNC": cl_12, }, + cl.channel_type: { + "UNORM_INT24": ("CL_1.2", "2020.3"), + "UNORM_INT_101010_2": ("CL_2.1", "2020.3"), + }, + cl.channel_order: { "Rx": cl_11, "RGx": cl_11, @@ -282,9 +287,12 @@ const_ext_lookup = { }, cl.sampler_info: { - "MIP_FILTER_MODE": cl_20, - "LOD_MIN": cl_20, - "LOD_MAX": cl_20, + "MIP_FILTER_MODE": ("(deprecated)", "2015.2"), + "LOD_MIN": ("(deprecated)", "2015.2"), + "LOD_MAX": ("(deprecated)", "2015.2"), + "MIP_FILTER_MODE_KHR": ("cl_khr_mipmap_image", "2020.3"), + "LOD_MIN_KHR": ("cl_khr_mipmap_image", "2020.3"), + "LOD_MAX_KHR": ("cl_khr_mipmap_image", "2020.3"), "PROPERTIES": cl_30, }, diff --git a/src/wrap_cl.hpp b/src/wrap_cl.hpp index 1f21237d944baa03a7de11fcb44d04235f74adbb..4ffb10a4f7bca7b45014857a23a8497a0e01640e 100644 --- a/src/wrap_cl.hpp +++ b/src/wrap_cl.hpp @@ -3664,6 +3664,23 @@ namespace pyopencl case CL_SAMPLER_NORMALIZED_COORDS: PYOPENCL_GET_TYPED_INFO(Sampler, m_sampler, param_name, cl_bool); +#if PYOPENCL_CL_VERSION >= 0x3000 + case CL_SAMPLER_PROPERTIES: + { + std::vector<cl_sampler_properties> result; + PYOPENCL_GET_VEC_INFO(Sampler, m_sampler, param_name, result); + PYOPENCL_RETURN_VECTOR(cl_sampler_properties, result); + } +#endif + +#ifdef CL_SAMPLER_MIP_FILTER_MODE_KHR + case CL_SAMPLER_MIP_FILTER_MODE_KHR: + PYOPENCL_GET_TYPED_INFO(Sampler, m_sampler, param_name, + cl_filter_mode); + case CL_SAMPLER_LOD_MIN_KHR: + case CL_SAMPLER_LOD_MAX_KHR: + PYOPENCL_GET_TYPED_INFO(Sampler, m_sampler, param_name, float); +#endif default: throw error("Sampler.get_info", CL_INVALID_VALUE); diff --git a/src/wrap_constants.cpp b/src/wrap_constants.cpp index 67c14a566a8eaa26f331e59166c8f1788827d38e..c8d904cb676a2068ca0919474872ce4b100b58b1 100644 --- a/src/wrap_constants.cpp +++ b/src/wrap_constants.cpp @@ -740,6 +740,12 @@ void pyopencl_expose_constants(py::module &m) ADD_ATTR( , UNSIGNED_INT32); ADD_ATTR( , HALF_FLOAT); ADD_ATTR( , FLOAT); +#if PYOPENCL_CL_VERSION >= 0x1020 + ADD_ATTR( , UNORM_INT24); +#endif +#if PYOPENCL_CL_VERSION >= 0x2010 + ADD_ATTR( , UNORM_INT_101010_2); +#endif } { @@ -838,6 +844,13 @@ void pyopencl_expose_constants(py::module &m) #if PYOPENCL_CL_VERSION >= 0x3000 ADD_ATTR(SAMPLER_, PROPERTIES); #endif +// {{{ cl_khr_mipmap_image +#ifdef CL_SAMPLER_MIP_FILTER_MODE_KHR + ADD_ATTR(SAMPLER_, MIP_FILTER_MODE_KHR); + ADD_ATTR(SAMPLER_, LOD_MIN_KHR); + ADD_ATTR(SAMPLER_, LOD_MAX_KHR); +#endif +// }}} } {