Confused on Steam Play and Proton? Be sure to check out our guide.
We do often include affiliate links to earn us some pennies. See more here.

The Mesa GLSL shader cache is now enabled by default

By - | Views: 21,785
I'm sure plenty of you will be happy with this, as Mesa now has the shader cache enabled by default in Mesa-git to allow for wider testing. It may be turned off for Mesa 17.1, if wider testing shows issues with it.

For those that don't quite understand, Mesa is the open source driver for Intel, AMD and NVIDIA graphics cards.

You might notice with Mesa that some games can take a long time to load, longer than they should take. Some games also might stutter when new areas are loaded, a shader cache should help with both.

In this commit, Timothy Arceri reverted a previous commit to have it disabled by default.

The shader cache was also improved in this commit, with it now supporting both 32bit and 64bit without deleting the cache if a user switched between them.

Multiple games will likely benefit from decreased loading time and smoother gameplay thanks to a shader cache.

Awesome work from the Mesa team as always. I don't personally have any AMD graphics cards to test with, so hopefully plenty from the community can test to see if it can stay enabled for Mesa 17.1. 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:

Purple Library Guy Mar 6, 2017
Quoting: MadeanaccounttocommentThe results also show an FPS increase which is weird because from what I've gathered this feature shouldn't improve FPS. Someone on forums mentioned it has something to do with the benchmark restarting itself but honestly I don't quite understand the explanation given.

Quoting: pal666there is no fps improvements from this feature. it is seen on benchmark only because benchmark is short and restarts game. if you don't restart game, you will see no fps improvements during play after first shader loads.

From the looks of that explanation, it sounds like the benchmark runs the game on some sort of loop--starts, "plays" for some set sequence, ends, and starts up again to run the game some more. So over the course of the benchmark, the game is restarted multiple times. If the restarts take less time, then over the course of the benchmark it will get through more frames just because more time is spent in game doing frames and less doing restarts. So you get an improvement in "FPS" over the whole run even though while the game is running it is not, in fact, doing more frames in a second.
Note that I have no idea whether this is true, but it looks like that's what this person is saying.
KuJo Mar 6, 2017
Quoting: ungutknut
Quoting: KuJoand with this ppa the OpenGL Version is up to 4.5 :).
But it looks like your version string still says 3.0... so I guess dying light still won't work with it? Anybody tested that?
I have 4.5 running. This is the essential line:
Max core profile version: 4.5
buenaventura Mar 7, 2017
Quoting: KuJoWow! I have just updated my padoka-ppa ( https://launchpad.net/~paulo-miguel-dias/+archive/ubuntu/mesa ) with which I have Mesa 17.1 dev support. The patch mentioned here was added there about 6 hours ago. I have an AMD R9 280 (GCN 1.1) on AMDGPU with RadeonSI, and with this ppa the OpenGL Version is up to 4.5 :).

~$ glxinfo | grep version

server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
    Max core profile version: 4.5
    Max compat profile version: 3.0
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
OpenGL core profile version string: 4.5 (Core Profile) Mesa 17.1.0-devel - padoka PPA
OpenGL core profile shading language version string: 4.50
OpenGL version string: 3.0 Mesa 17.1.0-devel - padoka PPA
OpenGL shading language version string: 1.30
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 17.1.0-devel - padoka PPA
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10


A before-and-after comparison makes me happy: The loading time of Deus EX: MD has shrunk from almost 5 minutes to under 1 minute! Really, wow!

I'm really curious how this affects the ingame performance.

Hum, why do I only have 17.0.0 ? I also use padoka:

§: glxinfo | grep version
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
Max core profile version: 4.5
Max compat profile version: 3.0
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.1
OpenGL core profile version string: 4.5 (Core Profile) Mesa 17.0.0-devel - padoka PPA
OpenGL core profile shading language version string: 4.50
OpenGL version string: 3.0 Mesa 17.0.0-devel - padoka PPA
OpenGL shading language version string: 1.30
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 17.0.0-devel - padoka PPA
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

I also have a GCN 1.1 (or is it 1.0 ?) card:
lspci gives:
00:01.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Mullins [Radeon R4/R5 Graphics] [1002:9851] (rev 05) (prog-if 00 [VGA controller])

Edit: perhaps my kernel is too old? I use the radeon driver. How did you go about using the AMDGPU?

Edit 2: Ah! I just had to do sudo apt-get dist-upgrade, now I got it. So lets try some PoE etc. see if anything changed.


Last edited by buenaventura on 7 March 2017 at 12:25 pm UTC
ziabice Mar 7, 2017
This just landed in Mesa-dev, could be benefical for a lot of us: Initial version of threaded GL dispatch V2
soulsource Mar 7, 2017
Quoting: CreakThe increased FPS is simply because there is less stuttering due to shader compilation in between two frames. The number shown is an average after a few minutes of gameplay. Mainly you won't see an increase, but you will feel that the games stutter less (from the second time you launch them)

Mesa did cache those shaders also previously, but in RAM, meaning the slightly increased frame-time was only occurring once per game-session per shader. With the new patches those shaders are being cached on disk, and mesa does no longer recompile them every time the game is restarted.
KuJo Mar 8, 2017
Quoting: buenaventuraHum, why do I only have 17.0.0 ? I also use padoka:

§: glxinfo | grep version
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
Max core profile version: 4.5
Max compat profile version: 3.0
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.1
OpenGL core profile version string: 4.5 (Core Profile) Mesa 17.0.0-devel - padoka PPA
OpenGL core profile shading language version string: 4.50
OpenGL version string: 3.0 Mesa 17.0.0-devel - padoka PPA
OpenGL shading language version string: 1.30
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 17.0.0-devel - padoka PPA
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

I also have a GCN 1.1 (or is it 1.0 ?) card:
lspci gives:
00:01.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Mullins [Radeon R4/R5 Graphics] [1002:9851] (rev 05) (prog-if 00 [VGA controller])

Edit: perhaps my kernel is too old? I use the radeon driver. How did you go about using the AMDGPU?

Edit 2: Ah! I just had to do sudo apt-get dist-upgrade, now I got it. So lets try some PoE etc. see if anything changed.

The answer to the first question you have already found by yourself (sudo apt-get dist-upgrade also updates all installation from the PPA).

Kernel:
I have updated my kernel to 4.10. With the Ukuu tool, this is a simple task. Have a look:
-> http://www.teejeetech.in/p/ukuu-kernel-upgrade-utility.html

Using AMDGPU instead of RADEON:
I´ve blacklisted the RADEON-driver, so that the AMDGPU will be used. You have to edit the grub-config /etc/default/grub, where you have to put in "modprobe.blacklist=radeon" next to "GRUB_CMDLINE_DEFAULT". After updating the grub-installation (sudo update-grub2) and a reboot you will be using the AMDGPU-driver. Do this only if you have previously ensured that besides the RADEON driver the AMDGPU driver is installed.

A simple guide to this can be found on this page under the chapter "Blacklisting radeon module":
-> https://varunpriolkar.com/2016/12/how-to-use-amdgpu-driver-for-southern-islands-and-sea-islands-card-on-ubuntu-linux/


Last edited by KuJo on 8 March 2017 at 9:00 am UTC
buenaventura Mar 8, 2017
Quoting: KuJo<SNIP>
Using AMDGPU instead of RADEON:
I´ve blacklisted the RADEON-driver, so that the AMDGPU will be used. You have to edit the grub-config /etc/default/grub, where you have to put in "modprobe.blacklist=radeon" next to "GRUB_CMDLINE_DEFAULT". After updating the grub-installation (sudo update-grub2) and a reboot you will be using the AMDGPU-driver. Do this only if you have previously ensured that besides the RADEON driver the AMDGPU driver is installed.

A simple guide to this can be found on this page under the chapter "Blacklisting radeon module":
-> https://varunpriolkar.com/2016/12/how-to-use-amdgpu-driver-for-southern-islands-and-sea-islands-card-on-ubuntu-linux/

Thank you very much for your answer!

I am using kernel 4.9-generic, do I need 4.10 to try out AMDGPU?

Also, have you noticed improvements compared to using radeon?
KuJo Mar 8, 2017
Quoting: buenaventuraI am using kernel 4.9-generic, do I need 4.10 to try out AMDGPU?

Also, have you noticed improvements compared to using radeon?

For using AMDGPU the kernel version 4.9 is sufficient. I have 4.10 installed, because I have re-set up my Linux installation recently and then immediately patched from 4.4. (Standard Kernel of Linux Mint 18.1) to the latest kernel version. There are only minor improvements for AMD graphics cards compared to version 4.9.:
-> http://www.phoronix.com/scan.php?page=news_item&px=Linux-4.10-Ten-Features

I use Linux only since the beginning of January as my standard OS (coming from Windows 7, rejecting the upgrade to Win 10) and ever since then directly switched to AMDGPU, because AMDGPU is the prerequisite for RadeonSI from the MESA package I wanted to use. Therefore, I have unfortunately no personal comparison values ​​between the RADEON driver and the AMDGPU driver.

But you can find some information about this in this article from Phoronix. There is an early comparison between the kernel version 4.8 with the RADEON driver and the kernel version 4.9 with the AMDGPU driver:
-> http://www.phoronix.com/scan.php?page=article&item=amdgpu-49-first


Last edited by KuJo on 8 March 2017 at 11:45 am UTC
buenaventura Mar 8, 2017
Quoting: KuJo
Quoting: buenaventuraI am using kernel 4.9-generic, do I need 4.10 to try out AMDGPU?

Also, have you noticed improvements compared to using radeon?

For using AMDGPU the kernel version 4.9 is sufficient. I have 4.10 installed, because I have re-set up my Linux installation recently and then immediately patched from 4.4. (Standard Kernel of Linux Mint 18.1) to the latest kernel version. There are only minor improvements for AMD graphics cards compared to version 4.9.:
-> http://www.phoronix.com/scan.php?page=news_item&px=Linux-4.10-Ten-Features

I use Linux only since the beginning of January as my standard OS (coming from Windows 7, rejecting the upgrade to Win 10) and ever since then directly switched to AMDGPU, because AMDGPU is the prerequisite for RadeonSI from the MESA package I wanted to use. Therefore, I have unfortunately no personal comparison values ​​between the RADEON driver and the AMDGPU driver.

But you can find some information about this in this article from Phoronix. There is an early comparison between the kernel version 4.8 with the RADEON driver and the kernel version 4.9 with the AMDGPU driver:
-> http://www.phoronix.com/scan.php?page=article&item=amdgpu-49-first

I see! Thanks, I will look at the article and decide if it might be worth it. Thank you for your time!
Vandenplas Mar 17, 2017
I am using the Padoka ppa and updated the system today morning. Whatever has changed, it has increased FPS massively in the games I tested. That is Rust, Metro Redux and Tomb Raider 2013.
I am playing Rust at 720p but in a full screen window with a native screen resolution of 1080p. After the update I could max out all settings and still had a fluent gameplay - which I never could do before.
I noticed also the GPU gets much hotter now. Earlier the GPU stayed relatively cool at 68°C under full load, but since today the gpu reports temps of up to 80°C under full load!! Obviously the GPU is working much harder now. FX [email protected] and HD7870 (default clock). Paolo Diaz and team have done some excellent work!
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.