Now beignet is a pure opencl 1.2 implementation.
Set some predefined macros correctly.
__OPENCL_C_VERSION__ and __OPENCL_VERSION__ should
be 120 by default.

Signed-off-by: Zhigang Gong <[email protected]>
---
 backend/src/ocl_stdlib.tmpl.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/backend/src/ocl_stdlib.tmpl.h b/backend/src/ocl_stdlib.tmpl.h
index 2e37513..6f05dac 100755
--- a/backend/src/ocl_stdlib.tmpl.h
+++ b/backend/src/ocl_stdlib.tmpl.h
@@ -120,9 +120,13 @@ typedef size_t __event_t;
 /////////////////////////////////////////////////////////////////////////////
 // OpenCL preprocessor directives & macros
 /////////////////////////////////////////////////////////////////////////////
-#define __OPENCL_VERSION__ 110
+#define __OPENCL_VERSION__ 120
 #define __CL_VERSION_1_0__ 100
 #define __CL_VERSION_1_1__ 110
+#define __CL_VERSION_1_2__ 120
+#ifndef __OPENCL_C_VERSION
+#define __OPENCL_C_VERSION__ 120
+#endif
 #define __ENDIAN_LITTLE__ 1
 #define __IMAGE_SUPPORT__ 1
 #define __kernel_exec(X, TYPE) __kernel 
__attribute__((work_group_size_hint(X,1,1))) \
-- 
1.8.3.2

_______________________________________________
Beignet mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/beignet

Reply via email to