clover: Avoid warnings from new OpenCL headers
authorPierre Moreau <pierre.morrow@free.fr>
Fri, 1 Feb 2019 11:33:37 +0000 (12:33 +0100)
committerKarol Herbst <kherbst@redhat.com>
Tue, 26 Feb 2019 20:02:07 +0000 (21:02 +0100)
* Avoid warnings from references to deprecated CL 1.0, 1.2, 2.0 and 2.1 APIs.
* Avoid warnings from not defining CL_TARGET_OPENCL_VERSION.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
src/gallium/state_trackers/clover/api/dispatch.hpp
src/gallium/state_trackers/clover/core/error.hpp
src/gallium/state_trackers/clover/core/object.hpp
src/gallium/state_trackers/clover/llvm/codegen/common.cpp

index 84b992af9baa398d7afc094e30cbd7715a252edd..ec924fef7d72f47cffc5cf424efb6f232dca5dc3 100644 (file)
 #ifndef API_DISPATCH_HPP
 #define API_DISPATCH_HPP
 
+#define CL_TARGET_OPENCL_VERSION 220
+
+#define CL_USE_DEPRECATED_OPENCL_1_0_APIS
 #define CL_USE_DEPRECATED_OPENCL_1_1_APIS
+#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
+#define CL_USE_DEPRECATED_OPENCL_2_0_APIS
+#define CL_USE_DEPRECATED_OPENCL_2_1_APIS
+
 
 #include "CL/cl.h"
 #include "CL/cl_ext.h"
index 0490c19a276d42462a8db23e7849942e573c0550..a38bbfa53c1a94ffaa5aa76773ebd6c605825bb4 100644 (file)
@@ -23,6 +23,7 @@
 #ifndef CLOVER_CORE_ERROR_HPP
 #define CLOVER_CORE_ERROR_HPP
 
+#define CL_TARGET_OPENCL_VERSION 220
 #include "CL/cl.h"
 
 #include <stdexcept>
index e3a5ab7fafd1f30a8096f20f725ea97faf28e5da..748fe9a12e8e2d50e2b53cfb2597e9174176c25f 100644 (file)
@@ -27,6 +27,7 @@
 #include <functional>
 #include <vector>
 
+#define CL_TARGET_OPENCL_VERSION 220
 #include "CL/cl.h"
 
 #include "core/error.hpp"
index ca5f78940d2aaba9766091524485d7f93f58ad56..98a9d5ffb5ed6a0257a101873c4913cc72d375cc 100644 (file)
@@ -33,6 +33,7 @@
 #include "llvm/codegen.hpp"
 #include "llvm/metadata.hpp"
 
+#define CL_TARGET_OPENCL_VERSION 220
 #include "CL/cl.h"
 
 #include "pipe/p_state.h"