Don't want to see articles from a certain category? When logged in, go to your User Settings and adjust your feed in the Content Preferences section where you can block tags!
We do often include affiliate links to earn us some pennies. See more here.
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.
6 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 checked 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. You can also follow my personal adventures on Bluesky.
See more from me
The comments on this article are closed.
All posts need to follow our rules. For users logged in: please hit the Report Flag icon on any post that breaks the rules or contains illegal / harmful content. Guest readers can email us for any issues.
20 comments

pete910 Feb 22, 2017
View PC info
  • Supporter Plus
I think this will help with rocket league too iirc
Shmerl Feb 23, 2017
Why can't those games take care of caching shaders on their own? It's completely possible for developers to do it to optimize things.


Last edited by Shmerl on 23 February 2017 at 12:08 am UTC
Avehicle7887 Feb 23, 2017
Great 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.
commodore256 Feb 23, 2017
When I had my 4870 before it died and about a year after it was declared legacy, I noticed I had better performance in Wine with Oblivion on the open source drivers than on Windows.


That alone I thought was fantastic, so yay for more performance!
lejimster Feb 23, 2017
It's about time! Much needed, hopefully it has been implemented properly. Looking forward too seeing benchmark comparisons. Not expecting fps gains, but it might help with stuttering and fps dips when compiling shaders that some titles suffer badly with.

I'll be interested to see if UE4 games benefit.
TheRiddick Feb 23, 2017
Phoronix saw over double increase in Deus Ex frame rates on his rx470 test. Very nice indeed.


Last edited by TheRiddick on 23 February 2017 at 5:33 am UTC
STiAT Feb 23, 2017
@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).
STiAT Feb 23, 2017
Phoronix saw over double increase in Deus Ex frame rates on his rx470 test. Very nice indeed.

That's very likely not because of this patch, since the patch was commited after the test of Phoronix, and he ran the same Mesa-Version against two different kernels.

And DeusEx runs pretty a lot better on kernel 4.8 than on 4.9 or 4.10, so I'd bet this was a regression introduced with 4.9 getting fixed with 4.11.


Last edited by STiAT on 23 February 2017 at 6:51 am UTC
Guppy Feb 23, 2017
@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).

Honestly I think it's something people don't consider because the closed source drivers already does it for them, so if they test with open source drivers and find that performance is worse they are unlikely to launch an investigation into it because the general expectation is that the opensource drivers will perform worse.
eldersnake Feb 23, 2017
Well 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).

Still on 4.10 in terms of kernels though so I guess performance won't yet be all that different.
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
Well 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
Why 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
Well 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
@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
Great 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
Why 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
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).

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.