Mesa now has a patch to enable a shader cache for radeonsi (AMD)

By - | Views: 11,704
This will probably be to the delight of many AMD graphics card owners who use the open source Mesa graphics drivers: A patch has been sent into the Mesa-dev mailing list for radeonsi to 'Add disk shader cache'.

I should note, that this patch comes from a newer developer who notes it's their first message to the Mesa-dev mailing list. The patch may need a lot of work, but it's nice to see someone make a start on it.

Also, since this is in the Mesa-dev mailing list it is not in the current Mesa code as it has not been accepted or reviewed as of yet.

The developer said this:
QuoteHi, 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.


They also note that it is missing features right now like:
- add #if ENABLE_SHADER_CACHE where needed.
- when loading from disk cache, also insert it to RAM cache.

You can see the mailing list entry here.

I don't own any AMD cards to test it with, nor do I understand the technical bits behind the code. I will leave it up to you in the comments to decide how it looks. I do understand that a shader cache is needed and highly sought-after by many. Article taken from GamingOnLinux.com.
3 Likes
We do often include affiliate links to earn us some pennies. We are currently affiliated with GOG and Humble Store. See more here.
About the author -
author picture
I am the owner of GamingOnLinux. After discovering Linux back in the days of Mandrake in 2003, I constantly came back to check on the progress of Linux until Ubuntu appeared on the scene and it helped me to really love it. You can reach me easily by emailing GamingOnLinux directly.
See more from me
The comments on this article are closed.
17 comments
Page: 1/2»
  Go to:

tuxintuxedo 24 Jan, 2017
Phoronix posted an article about a bigger patch just yesterday. Things seem to be moving faster.
mirv 24 Jan, 2017
View PC info
  • Supporter Plus
Sadly, it looks like this isn't quite what is really expected - it doesn't cache the final compiler and linker output sections. So it's not quite something to get overly excited about yet, but there is someone looking at things and getting more familiar with the codebase. I hope the dev continues to look at things, and improve upon what is there - keep it up!
Joeyboots80 24 Jan, 2017
Loving all the progress lately in Mesa! Things are looking better and better for AMD users! :)
Zappor 24 Jan, 2017
Hmm, I don't think this was something to write about yet...
Guest 24 Jan, 2017
Quoting: tuxintuxedoPhoronix .

Im sure it's fine and all but a lot of forums have rules on not posting about other similar forums ( no offense) or linking directly, especially those in some sort of semi-competing field. If anything it seems courteous to not mention that site and perhaps just say 'another linux news site'.

Not my call though.


Last edited by on 24 January 2017 at 6:45 pm UTC
Liam Dawe 24 Jan, 2017
Quoting: meggerman
Quoting: tuxintuxedoPhoronix .

Im sure it's fine and all but a lot of forums have rules on not posting about other similar forums ( no offense) or linking directly, especially those in some sort of semi-competing field. If anything it seems courteous to not mention that site and perhaps just say 'another linux news site'.

Not my call though.
I honestly don't mind people mentioning or linking competing sites.
Quoting: ZapporHmm, I don't think this was something to write about yet...
We write about a lot of things under development, this is no different.
Guest 24 Jan, 2017
Quoting: liamdaweI honestly don't mind people mentioning or linking competing sites.

Fair enough :)
ziabice 24 Jan, 2017
View PC info
  • Supporter Plus
Yeah, more Mesa... View video on youtube.com
Maelrane 24 Jan, 2017
I honestly don't know: does amdgpu (mesa! Not proprietary pro one) profit from this?
mirv 24 Jan, 2017
View PC info
  • Supporter Plus
Quoting: MaelraneI honestly don't know: does amdgpu (mesa! Not proprietary pro one) profit from this?

From this particular patch set, no, I don't think so. At least that's what I'm gathering from the reply to the mesa-dev thread. The savings are minimal, and probably barely noticed, because "heavy" components of shader generation are not included in this caching.
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: Liberapay or PayPal.

This ensures all of our main content remains totally free for everyone with no article paywalls. We also don't have tons of adverts, there's also no tracking and we respect your privacy. Just good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
The comments on this article are closed.