clover: Update OpenCL version string to match OpenGL
authorVedran Miletić <vedran@miletic.net>
Mon, 6 Jun 2016 10:43:33 +0000 (12:43 +0200)
committerFrancisco Jerez <currojerez@riseup.net>
Mon, 13 Jun 2016 22:55:59 +0000 (15:55 -0700)
Change MESA into Mesa in CL_PLATFORM_VERSION and CL_DEVICE_VERSION. For
both, always append git version suffix from git_sha1.h.

v5: move semicolon to same line as MESA_GIT_SHA1.
v4: drop #ifdef guards.
v3: add missing include.
v2: change CL_DEVICE_VERSION as well.

Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
src/gallium/state_trackers/clover/api/device.cpp
src/gallium/state_trackers/clover/api/platform.cpp

index bc93f91d0ec85e3f95b78ae342c375407515dd77..ed323e09afc4020719136bf2c5da1599a6bff60a 100644 (file)
@@ -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,8 @@ 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:
index cf71593693e66cc4416b2feb68bd538d23562a13..cdb8a9903b48e42cf6f9d84e7b354ba0a1c7505f 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "api/util.hpp"
 #include "core/platform.hpp"
+#include "git_sha1.h"
 
 using namespace clover;
 
@@ -57,7 +58,8 @@ 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: