From: Niels Ole Salscheider Date: Sun, 28 Aug 2016 14:42:34 +0000 (+0200) Subject: st/clover: Define __OPENCL_VERSION__ on the device side X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cfa914a1b4e20e7ef416171f5212f21e8224befc;p=mesa.git st/clover: Define __OPENCL_VERSION__ on the device side This is required by the OpenCL standard. Signed-off-by: Niels Ole Salscheider Reviewed-by: Edward O'Callaghan Reviewed-by: Vedran Miletić --- diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp index 5490d7254eb..b5e8b523fab 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(