clover: conditionally use MESA_GIT_SHA1
authorEmil Velikov <emil.velikov@collabora.com>
Tue, 21 Jun 2016 17:21:54 +0000 (18:21 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 5 Jul 2016 11:14:34 +0000 (12:14 +0100)
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.

v2: Kill off gracious blank line (Vedran).

Cc: mesa-stable@lists.freedesktop.org
Cc: Vedran Miletić <vedran@miletic.net>
Cc: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (v1)
Reviewed-by: Vedran Miletić <vedran@miletic.net>
src/gallium/state_trackers/clover/api/device.cpp
src/gallium/state_trackers/clover/api/platform.cpp

index ed323e09afc4020719136bf2c5da1599a6bff60a..11f21e94eae4b4543682b02f8f88f6c2bd2d8338 100644 (file)
@@ -302,7 +302,10 @@ 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:
index cdb8a9903b48e42cf6f9d84e7b354ba0a1c7505f..b1b1fdfb6f2f6f10cafe049ea852f8509a618e81 100644 (file)
@@ -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: