Module: Mesa
Branch: master
Commit: cfa914a1b4e20e7ef416171f5212f21e8224befc
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=cfa914a1b4e20e7ef416171f5212f21e8224befc

Author: Niels Ole Salscheider <[email protected]>
Date:   Sun Aug 28 16:42:34 2016 +0200

st/clover: Define __OPENCL_VERSION__ on the device side

This is required by the OpenCL standard.

Signed-off-by: Niels Ole Salscheider <[email protected]>
Reviewed-by: Edward O'Callaghan <[email protected]>
Reviewed-by: Vedran Miletić <[email protected]>

---

 src/gallium/state_trackers/clover/llvm/invocation.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp 
b/src/gallium/state_trackers/clover/llvm/invocation.cpp
index 5490d72..b5e8b52 100644
--- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
+++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
@@ -153,6 +153,9 @@ namespace {
       // Add libclc include
       c.getPreprocessorOpts().Includes.push_back("clc/clc.h");
 
+      // Add definition for the OpenCL version
+      c.getPreprocessorOpts().addMacroDef("__OPENCL_VERSION__=110");
+
       // clc.h requires that this macro be defined:
       c.getPreprocessorOpts().addMacroDef("cl_clang_storage_class_specifiers");
       c.getPreprocessorOpts().addRemappedFile(

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to