[Mesa-dev] [PATCH 2/2] Add LLVM version to Mesa version strings

Giuseppe Bilotta giuseppe.bilotta at gmail.com
Tue May 24 07:03:38 UTC 2016

On Tue, May 24, 2016 at 12:46 AM, Marek Olšák <maraeo at gmail.com> wrote:
> On Mon, May 23, 2016 at 10:47 PM, Giuseppe Bilotta
> <giuseppe.bilotta at gmail.com> wrote:
>> On Mon, May 23, 2016 at 4:45 PM, Marek Olšák <maraeo at gmail.com> wrote:
>>> I think it would be better to put stuff like this only into the
>>> renderer string of drivers which use LLVM. The majority of drivers
>>> don't care about the LLVM version.
>> Hm, that might be a good point. Is there a way to programmatically (at
>> source level) tell if a driver uses LLVM or not?
> All drivers that use "gallium/auxiliary/draw" also use LLVM, but they
> might only use it for rare corner cases. The big LLVM users are
> softpipe (VS/GS part only), swr (not sure), llvmpipe, and radeonsi.
> Both llvmpipe and radeonsi already report the LLVM version via the
> renderer string.

Hm, it looks like for the LLVM version string addition I can just
revert to my original approach of only adding it to OpenCL then. I had
misread one of the comments to my original RFC patch, which is why I
added it to the global Mesa version string (I didn't touch any of the
renderer version strings anyway).

My intent was to add it in:

* for OpenGL,the suffix appended to the OpenGL core profile version
string, OpenGL version string and OpenGL ES profile version string,
never the version string for the specific renderer;
* for OpenCL, the suffix appended to the platform vendor string, and
each device vendor string.

Now, I don't know about OpenGL, but for OpenCL at least it's useful to
report the LLVM Mesa was built with, because in my experience, when
there are multiple ICDs built with different LLVM versions (e.g. mesa,
pocl and beignet) during usage (particularly at kernel compilation;
not sure why, unversioned shared symbols maybe?) all kinds of hell can
ensue. Just querying the platform strings would be an easy way to spot
this problem if they each reported the LLVM version they were built

If this isn't important for OpenGL, I can rework the patch to omit the
LLVM version in the general version string. OTOH, it would give some
consistency between OpenGL and OpenCL to have the same version string,
even if LLVM is not as relevant in the GL case.

So, now the question is about the OpenCL device version string. Again,
the LLVM version is important when it's used to triage regressions
derived from changes in LLVM version if drivers actually use it, and
for consistency I see no reason to omit it from the other drivers, but
if there is a preference to be more minimalistic, I can be more
selective about it (are there clover drivers that do not use LLVM?)

Giuseppe "Oblomov" Bilotta

More information about the mesa-dev mailing list