st/clover: Define __OPENCL_VERSION__ on the device side
authorNiels Ole Salscheider <niels_ole@salscheider-online.de>
Sun, 28 Aug 2016 14:42:34 +0000 (16:42 +0200)
committerFrancisco Jerez <currojerez@riseup.net>
Sat, 10 Sep 2016 22:48:54 +0000 (15:48 -0700)
This is required by the OpenCL standard.

Signed-off-by: Niels Ole Salscheider <niels_ole@salscheider-online.de>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Vedran Miletić <vedran@miletic.net>
src/gallium/state_trackers/clover/llvm/invocation.cpp

index 5490d7254eb3c86c04c174f0e72af00ebf3d1195..b5e8b523fabc0616feb829ecd6079879929ade0a 100644 (file)
@@ -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(