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

Francisco Jerez currojerez at riseup.net
Mon Jun 6 00:31:52 UTC 2016


Vedran Miletić <vedran at miletic.net> writes:

> 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 ")"
> +                        ;

No need to put the semicolon in a separate line.

>        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 ")"
> +                        ;

Same here.  With my nitpicks addressed:

Reviewed-by: Francisco Jerez <currojerez at riseup.net>

>        break;
>  
>     case CL_PLATFORM_NAME:
> -- 
> 2.7.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160605/c5b4f0d4/attachment.sig>


More information about the mesa-dev mailing list