[Mesa-dev] [PATCH] radeonsi Add disk shader cache

Timothy Arceri t_arceri at yahoo.com.au
Tue Jan 24 21:59:16 UTC 2017


On Tue, 2017-01-24 at 18:10 +0100, kdj0c wrote:
> On 24/01/2017 17:40, Nicolai Hähnle wrote:
> > On 24.01.2017 17:08, kdj0c wrote:
> > > use the util/disk_cache.c interface to cache some? radeonsi
> > > shaders on disk
> > > 
> > > missing features :
> > > 
> > > - add #if ENABLE_SHADER_CACHE where needed.
> > > - when loading from disk cache, also insert it to RAM cache.
> > > 
> > > must be built with --enable-shader-cache to have the cache
> > > working.
> > > ---
> > > Hi, This is my first mail to the list.
> > > 
> > > I'm not sure this is the right way to do this, it's my first
> > > attempt to patch mesa.
> > > I've tested on a radeon HD7950 with glxgears and quake3. I have
> > > some binary shaders in ~/.cache/mesa after running them, and they
> > > are re-used when re-launching them.
> > > I wanted to test more recent games, but the LD_LIBRARY_PATH trick
> > > didn't work with steam games, and I don't want to install mesa
> > > master system-wide.
> > 
> > Unfortunately, I'd say that this is a pretty wrong approach. A
> > radeonsi-level cache is nice, but the GLSL-level compilation and
> > linking has overhead as well, which we want to avoid with the
> > cache.
> > 
> > We really want to detect a re-used shader already at the GLSL
> > level, to be able to go straight to binaries (and TGSI I guess, for
> > optimized monolithic variants).
> > 
> 
> ok This is what I was wondering, it's not the right place to put it.
> (but it was easy because there was already a RAM cache).
> 
> Thanks

Hi,

Welcome to contributing to Mesa :)

I'm not sure how much time you have to work on this feature, but just
letting you know it was my intention to start work on shade cache
support for radeonsi next week. 

Tim


More information about the mesa-dev mailing list