clover: Dynamically calculate __OPENCL_VERSION__ and CLC language version
authorAaron Watry <awatry@gmail.com>
Wed, 28 Feb 2018 02:49:03 +0000 (20:49 -0600)
committerAaron Watry <awatry@gmail.com>
Wed, 21 Mar 2018 11:59:46 +0000 (06:59 -0500)
commitc95d953b18d5174153e55957fb6947b9b59588ce
tree26ee14a026edefc35363d44b85c2e2a0f2404614
parent29b4090d18fa3e7435450e30383d0416e536a425
clover: Dynamically calculate __OPENCL_VERSION__ and CLC language version

Use get_language_version to calculate default cl standard based on
device capabilities and -cl-std specified in build options.

v5; move dev_clc_version declaration from an earlier patch
v4: Squash the __OPENCL_VERSION__ and CLC language version patches
v3: (Jan) Allow device_version up to 2.2 while device_clc_version
    only goes to 2.0
    Use get_cl_version to calculate version instead
v2: Split out from the previous patch (Pierre)

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Pierre Moreau <pierre.morrow@free.fr>
CC: Jan Vesely <jan.vesely@rutgers.edu>
src/gallium/state_trackers/clover/llvm/invocation.cpp