We do often include affiliate links to earn us some pennies. See more here.

Mesa now has a shader cache in Mesa-git for r600/radeonsi

By - | Views: 19,419
Good news for AMD GPU owners on open source drivers, as Mesa-git now has a shader cache enabled for r600 and radeonsi.

This new feature is quite essential for a lot of games and will be a welcome addition to Mesa 17.1.

Games like Shadow of Mordor, Deus Ex Mankind Divided, Hitman and others will likely benefit from this feature, as it's something proprietary drivers have had for a long time. It can help reduce loading times, reduce stuttering and so on.

It will be interesting to hear from AMD GPU owners on how this improves things for you, as I don't personally have any AMD GPUs myself to test on.

See this commit where it was enabled by Timothy Arceri. Article taken from GamingOnLinux.com.
7 Likes
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. Find me on Mastodon.
See more from me
The comments on this article are closed.
20 comments
Page: «2/2
  Go to:

Shmerl Feb 23, 2017
Just built Mesa from source, and tested it with Shadwen. It indeed loads much faster second time.

UPDATE: Witcher 2 also loads much faster now on subsequent runs.


Last edited by Shmerl on 23 February 2017 at 8:01 am UTC
Marc Di Luzio Feb 23, 2017
  • Game Dev
  • Supporter Plus
Quoting: eldersnakeWell Deus Ex: MD certainly loads a bit quicker. And now a cache folder with about 70MB worth of stuff has been created in my /tmp/cache folder (I have the mesa cache flag set to put the cache there, not sure if its totally necessary).

Quick note - /tmp will get trashed on a reboot, depending on how your tmpfs is set up, so if you want to keep those fast load times across reboots you might wanna move it to disk somewhere :)
cRaZy-bisCuiT Feb 23, 2017
Could anyone please check Trine 2 and Trine 3 loading times? :)
aejsmith Feb 23, 2017
Quoting: ShmerlWhy can't those games take care of caching shaders on their own? It's completely possible for developers to do it to optimize things.

This is a cache of compiled shaders. To cache these in a game would require GL_ARB_get_program_binary or something similar to get access to compiled binaries, which Mesa doesn't implement (or rather, it does, but it does not implement any binary formats which means it can't actually be used for anything).
eldersnake Feb 23, 2017
Quoting: mdiluz
Quoting: eldersnakeWell Deus Ex: MD certainly loads a bit quicker. And now a cache folder with about 70MB worth of stuff has been created in my /tmp/cache folder (I have the mesa cache flag set to put the cache there, not sure if its totally necessary).

Quick note - /tmp will get trashed on a reboot, depending on how your tmpfs is set up, so if you want to keep those fast load times across reboots you might wanna move it to disk somewhere :)

Lol, good point!
MayeulC Feb 23, 2017
Quoting: STiAT@Shmerl is right, game developers could have perfectly well built their own shader disk cache.

Looking at the patch, if it is really essential for many games, I really wonder why it wasn't implemented earlier. Maybe they just had too many other issues to fix, but this patch is .. pretty simple. Or maybe they assumed that games would do their caches on their own anyway (I'm sure Croteam does this "because they can" :p).

Oh, don't worry, it took more than one patch :)
Those patches have been sitting on the mailing list for a long time (2014, IIRC), and only recently did the developers pick them up. I guess they had other priorities, such as feature enabling and performance improvements. This is mot strictly speaking a performance improvement, but it can reduce loading times and stuttering (only in a few special games in the latter).

However, this is only a GLSL/TGSI cache, not an actual binary cache, if I read this correctly. That means there might be some more room for improvements here. The one for radeonsi is coming a bit latter, I don't think it is planned ATM for R600g.

As for rocket league, most of my problems (including loading time, audio problems, etc) were solved recently. It might be due to an update or to me upgrading from 4GB of RAM to 8. I think it definitely made a difference for the sound, since I get a lot less garbage out of my speakers since this RAM upgrade (tip for PulseAudio users).
crt0mega Feb 23, 2017
Neat.

Does anybody know the current state of Soft-FP64?
Xicronic Feb 23, 2017
Quoting: Avehicle7887Great news for AMD users, hopefully it will be enabled for Intel HD too one day (unless it's there already), Sometimes I'm stuck only with a laptop.

It is, in fact Intel did the bulk of the shader caching work. The recent patches by Arceri just allow R600/RadeonSI to interface with the driver nonspecific code Intel made.

Of course, I think it only supports recent Intel chipsets.


Last edited by Xicronic on 23 February 2017 at 4:35 pm UTC
Shmerl Feb 23, 2017
Quoting: aejsmith
Quoting: ShmerlWhy can't those games take care of caching shaders on their own? It's completely possible for developers to do it to optimize things.

This is a cache of compiled shaders. To cache these in a game would require GL_ARB_get_program_binary or something similar to get access to compiled binaries, which Mesa doesn't implement (or rather, it does, but it does not implement any binary formats which means it can't actually be used for anything).

Why doesn't Mesa implement any binary formats? Developers just never got to do it, or something blocks it?
ZodiacMentor Feb 24, 2017
Quoting: M@yeulCAs for rocket league, most of my problems (including loading time, audio problems, etc) were solved recently. It might be due to an update or to me upgrading from 4GB of RAM to 8. I think it definitely made a difference for the sound, since I get a lot less garbage out of my speakers since this RAM upgrade (tip for PulseAudio users).

Not that long ago (perhaps 2 weeks?), there was a mesa radeonsi update on memory buffer handling code, and not long after that, there was a Rocket League linux-client update that changed the assetloader-thread code to a different memory buffer handling approach. Both of these changes fixed the radeonsi multisecond lag issue on their own, so if you have updated either Mesa or kept the Steam client online (and thus updated Rocket League), you should have either or both of these fixes.

Ram does help though, in many ways, so it's not a bad update, even though it isn't the cause here for you increased performance in Rocket League.

EDIT: Fixed a stray ä replacing a '


Last edited by ZodiacMentor on 1 March 2017 at 2:45 pm UTC
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring 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.