[Mesa-stable] [Mesa-dev] [PATCH v4] clover: Update OpenCL version string to match OpenGL

Vedran Miletić vedran at miletic.net
Sun Jun 5 23:32:01 UTC 2016


On 06/06/2016 12:44 AM, Vedran Miletić wrote:
> Change MESA into Mesa in CL_PLATFORM_VERSION and CL_DEVICE_VERSION. For
> both, always append git version suffix from git_sha1.h.
>
> v4: dropped #ifdef guards.
>
> It would be very nice if this could be considered for 12.0 release.
> ---
>  src/gallium/state_trackers/clover/api/device.cpp   | 5 ++++-
>  src/gallium/state_trackers/clover/api/platform.cpp | 5 ++++-
>  2 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_trackers/clover/api/device.cpp
> index bc93f91..0d3de45 100644
> --- a/src/gallium/state_trackers/clover/api/device.cpp
> +++ b/src/gallium/state_trackers/clover/api/device.cpp
> @@ -23,6 +23,7 @@
>  #include "api/util.hpp"
>  #include "core/platform.hpp"
>  #include "core/device.hpp"
> +#include "git_sha1.h"
>
>  using namespace clover;
>
> @@ -300,7 +301,9 @@ clGetDeviceInfo(cl_device_id d_dev, cl_device_info param,
>        break;
>
>     case CL_DEVICE_VERSION:
> -      buf.as_string() = "OpenCL 1.1 MESA " PACKAGE_VERSION;
> +      buf.as_string() = "OpenCL 1.1 Mesa " PACKAGE_VERSION
> +                        " (" MESA_GIT_SHA1 ")"
> +                        ;
>        break;
>
>     case CL_DEVICE_EXTENSIONS:
> diff --git a/src/gallium/state_trackers/clover/api/platform.cpp b/src/gallium/state_trackers/clover/api/platform.cpp
> index cf71593..1784fbc 100644
> --- a/src/gallium/state_trackers/clover/api/platform.cpp
> +++ b/src/gallium/state_trackers/clover/api/platform.cpp
> @@ -22,6 +22,7 @@
>
>  #include "api/util.hpp"
>  #include "core/platform.hpp"
> +#include "git_sha1.h"
>
>  using namespace clover;
>
> @@ -57,7 +58,9 @@ clover::GetPlatformInfo(cl_platform_id d_platform, cl_platform_info param,
>        break;
>
>     case CL_PLATFORM_VERSION:
> -      buf.as_string() = "OpenCL 1.1 MESA " PACKAGE_VERSION;
> +      buf.as_string() = "OpenCL 1.1 Mesa " PACKAGE_VERSION
> +                        " (" MESA_GIT_SHA1 ")"
> +                        ;
>        break;
>
>     case CL_PLATFORM_NAME:
>

CC'ing mesa-stable as well.

-- 
Vedran Miletić
vedran.miletic.net


More information about the mesa-stable mailing list