[Mesa-stable] [PATCH 1/4] clover: conditionally use MESA_GIT_SHA1

Emil Velikov emil.l.velikov at gmail.com
Wed Jun 22 12:04:40 UTC 2016


From: Emil Velikov <emil.velikov at collabora.com>

Considering how hard/annoying it was for many peoples' workflow to
properly generate the macro, it will be demoted to conditionally
available with follow-up commits.

Cc: mesa-stable at lists.freedesktop.org
Cc: Vedran Miletić <vedran at miletic.net>
Cc: Francisco Jerez <currojerez at riseup.net>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 src/gallium/state_trackers/clover/api/device.cpp   | 6 +++++-
 src/gallium/state_trackers/clover/api/platform.cpp | 5 ++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_trackers/clover/api/device.cpp
index ed323e0..7ad01d9 100644
--- a/src/gallium/state_trackers/clover/api/device.cpp
+++ b/src/gallium/state_trackers/clover/api/device.cpp
@@ -302,7 +302,11 @@ clGetDeviceInfo(cl_device_id d_dev, cl_device_info param,
 
    case CL_DEVICE_VERSION:
       buf.as_string() = "OpenCL 1.1 Mesa " PACKAGE_VERSION
-                        " (" MESA_GIT_SHA1 ")";
+#ifdef MESA_GIT_SHA1
+                        " (" MESA_GIT_SHA1 ")"
+
+#endif
+			;
       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 cdb8a99..b1b1fdf 100644
--- a/src/gallium/state_trackers/clover/api/platform.cpp
+++ b/src/gallium/state_trackers/clover/api/platform.cpp
@@ -59,7 +59,10 @@ clover::GetPlatformInfo(cl_platform_id d_platform, cl_platform_info param,
 
    case CL_PLATFORM_VERSION:
       buf.as_string() = "OpenCL 1.1 Mesa " PACKAGE_VERSION
-                        " (" MESA_GIT_SHA1 ")";
+#ifdef MESA_GIT_SHA1
+                        " (" MESA_GIT_SHA1 ")"
+#endif
+                        ;
       break;
 
    case CL_PLATFORM_NAME:
-- 
2.8.2



More information about the mesa-stable mailing list