[Mesa-dev] GLSL IR & TGSI on-disk shader cache

Emil Velikov emil.l.velikov at gmail.com
Wed Feb 15 14:02:33 UTC 2017


Hi all,

On 11 February 2017 at 02:44, Pierre-Loup A. Griffais
<pgriffais at valvesoftware.com> wrote:

> Ideally LLVM could expose a version string/number that's granular enough,
> and distros/users could be trusted to properly amend that version string if
> they make functional changes to something that can affect shader
> compilation, but maybe that's wishful thinking.
>
I share your sentiment here - it is too much of a wishful thinking. To
build on top of that:

Afaics currently one cannot get the LLVM version at runtime, so in the
odd corner case you will get issues when mesa is linked against shared
LLVM.
The latter of which what most distros explicitly opting for.

> I'm not so sure that a build-id is a silver bullet here either, but if you
> can rely on its existence because it's written into the binary by a part of
> the build system that no distro will ever mess with, it seems like it would
> work. It would be more conservative than strictly needed, but that isn't a
> major issue in the short term. It would at least allow us to get compelling
> data showing whether moving to a less granular cache key would allow us to
> serve significantly more users.
>
Considering the earlier comment and the case Kai mentioned (note that
PPA builders do the same/similar thing) using the build-id is won't be
that conservative of a solution ;-)

Thanks
Emil


More information about the mesa-dev mailing list