[Mesa-dev] [PATCH] st/clover: Define __OPENCL_VERSION__ on the device side

Edward O'Callaghan funfunctor at folklore1984.net
Mon Aug 29 00:17:30 UTC 2016



On 08/29/2016 12:42 AM, Niels Ole Salscheider wrote:
> This is required by the OpenCL standard.
> 
> Signed-off-by: Niels Ole Salscheider <niels_ole at salscheider-online.de>
Reviewed-by: Edward O'Callaghan <funfunctor at folklore1984.net>

> ---
>  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(
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160829/11f5d7a4/attachment-0001.sig>


More information about the mesa-dev mailing list