opencl: Define CL_USE_DEPRECATED_OPENCL_2_0_APIS to avoid warnings.

Sebastian Lackner sebastian at fds-team.de
Fri Jul 31 00:56:31 CDT 2015


Since a recent update of OpenCL on Archlinux various functions are marked as deprecated.
The warning can be silenced by adding a define CL_USE_DEPRECATED_OPENCL_2_0_APIS.

--- snip ---
/* Deprecated OpenCL 2.0 APIs */
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_2_0_DEPRECATED cl_command_queue CL_API_CALL
clCreateCommandQueue(...) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED;

extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_2_0_DEPRECATED cl_sampler CL_API_CALL
clCreateSampler(...) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED;

extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_2_0_DEPRECATED cl_int CL_API_CALL
clEnqueueTask(...) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED;
--- snip ---

---
 dlls/opencl/opencl.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/opencl/opencl.c b/dlls/opencl/opencl.c
index c3d25b5..f690733 100644
--- a/dlls/opencl/opencl.c
+++ b/dlls/opencl/opencl.c
@@ -32,6 +32,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(opencl);
 
 #if defined(HAVE_CL_CL_H)
 #define CL_USE_DEPRECATED_OPENCL_1_1_APIS
+#define CL_USE_DEPRECATED_OPENCL_2_0_APIS
 #include <CL/cl.h>
 #elif defined(HAVE_OPENCL_OPENCL_H)
 #include <OpenCL/opencl.h>
-- 
2.5.0



More information about the wine-patches mailing list