[Mesa-dev] [PATCH] radeonsi Add disk shader cache
kdj0c
kdj0c at djinvi.net
Tue Jan 24 23:01:50 UTC 2017
On 24/01/2017 22:59, Timothy Arceri wrote:
> 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.
ok, I was following the advice and looking at glsl and tgsi code,
but I'm a bit lost. That looks to complex for a first contribution.
I can still help by testing patches (on radeon HD7950 only).
Thanks,
--
Jocelyn
>
> Tim
> _______________________________________________
> 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