[Mesa-dev] GLSL IR & TGSI on-disk shader cache
Nicolai Hähnle
nhaehnle at gmail.com
Fri Feb 10 12:05:38 UTC 2017
On 07.02.2017 04:42, Timothy Arceri wrote:
> This series adds support for a GLSL IR level and TGSI (OpenGL/st)
> level caches.
>
> There are a few small bug fixes and a little bit of restructuring
> to the GLSL IR patches to make things work for Gallium drivers vs
> just i965 previously, but nothing too major.
>
> The biggest change is patch 35 which changes the mesa cache
> directory to be more structured allowing us to not fallback to
> recompiles at draw time if we realise a cache item was created
> with an old version of Mesa. Patch 36 also cleans up old cache
> files so we shouldn't get into a possition were we are constantly
> evicting cache items because its never cleaned out.
>
> Even with the new directory structure I've still left in the
> code that adds the Mesa version string to cache items because
> users can do things like override the OpenGL version which will
> change the output (in future we might want to just add this as
> part of the sha1 input).
>
> This series does not include the patch that adds cache support
> to the radeonsi backend, the main reason for this is that llvm
> currently doesn't allow the version to be queried at runtime
> (as far as I'm aware) although it seems like other are interested
> in this feature [1] so I will follow up on that.
>
> The reason we don't just use the build time like radv is that we
> will want something consistent accross distros to enable
> distribution of precompiled shaders.
>
> Without the radeonsi patch min fps still goes up around 4 fps in
> the Shadow of Mordor benchmark (although the stalls are still
> very noticeable).
>
> I should also point out that this enables a tgsi level cache for
> r600, but I haven't tested this myself and lack the hardware.
>
> Also any other Gallium driver that uses TGSI should also be able
> to enable support.
>
> Please review.
Thank you for this!
I've tried to dig through the patches, and the first ~half looks pretty
good. Towards the end I started having some questions around the whole
cache_fallback thing, and there are some bits and pieces throughout.
I made some comments about the order of patches, but I don't think
that's too important after all, as long as the cache as a whole is
guarded by a big enable that's at the end of the series.
Cheers,
Nicolai
>
> [1] https://groups.google.com/forum/#!topic/llvm-dev/xUg8fAKIKsA
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
More information about the mesa-dev
mailing list