You can sign up to get a daily email of our articles, see the Mailing List page.
We do often include affiliate links to earn us some pennies. See more here.

Steam Beta adds Vulkan shader processing

By - | Views: 75,252

Valve has enabled the next step towards making Steam games on Linux run smoother in the latest Steam Beta release.

This is something Valve has been working towards for some time now, as the Steam Client has been able to download pre-compiled GPU shaders, which you might have seen when something pops up in your Steam Downloads with an OpenGL and Vulkan icon below.

In the latest Steam Beta from May 25, it wasn't actually mentioned but there's a new option you can enable in the Shader Pre-Caching settings to "Allow background processing of Vulkan shaders". So it will process in the background and then when you go to click play, if it's not done on that particular title it should then kick into full-gear and attempt to process before loading the game. For those interested in a little background, it's using the Fossilize library and Vulkan layer which you can find on Valve's GitHub.

Note: Right now on NVIDIA the it seems the main processing will only use 1 core due to an issue, hopefully that will be solved soon. On AMD it's able to use multiple threads when it needs to. It appears you can tweak background thread count by going to "steam://open/console" and tweaking the "unShaderBackgroundProcessingThreads" var, but do so at your own risk.

The result should be that you see much improved performance. We're not talking a boost to the maximum framerate but reducing overall stutter. Something that has been a big problem in some games. As the idea is that instead of the game building it all up as it's playing, it's got it all ready for you when you hit play and this applies to both native/supported titles and Proton.

It doesn't just do it for installed games, it will do it as you're downloading them too, so by the time you've finished downloading it might even be all ready.

Article taken from
Tags: Beta, Steam, Update, Vulkan
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.
Page: «2/4»
  Go to:

rkfg May 26, 2020
Quoting: DadSchoorse
Quoting: rkfgFortunately, this format is standardized at the spec level so you can use the same shader cache on any GPU, be it AMD, NVIDIA or Intel and you won't need to rebuild it each time you update the driver (remember that pain with OpenGL?). It's not a problem for correctly ported games as the port developer (like Feral) can create a native SPIR-V cache ahead of time so the game just loads the shader it needs directly. That's why Shadow of the Tomb Raider runs so smooth natively and stutters like hell on DXVK.
You are misunderstanding what SPIR-V is. It's not something that the gpu can execute, it still needs to be combined with more pipeline state information and then optimized and compiled to the specific gpu's machine code. This is very expensive to do and causes the stuttering with DXVK. And that's where fossilize comes into play. It collects all pipeline state and all shaders to create the pipelines (basically gpu programs) and then Steam distributes them so that you can compile them for your specific driver and gpu outside of the game. That way the driver can cache the pipelines and doesn't need to compile them from scratch while you're playing.
As for why Feral ports don't stutter like DXVK, D3D11 doesn't give enough information on how a shader will be used before actually using it, that's why DXVK can only compile the pipeline when the game draws something with it. Feral know how shaders will be used since they have access to the game, so that's a big advantage.
Thanks, that's new to me! I thought SPIR-V is executed directly by the underlying driver since it's in the standard. But yeah, the very low hardware level is still different for every GPU so indeed some sort of translation happens under the hood. I didn't know the bottleneck is in the final compilation for the GPU. Good explanation, I was wondering why we need more preprocessing with this new feature if Steam already provides the cache. Now it's more clear.

Also, in the Fossilize README there's this:
QuoteThe goal for this project is to cover some main use cases:
Serialize state in application once, replay on N devices to build up VkPipelineCache objects without having to run application.
I think this is exactly what happens because when Steam is doing this new task there's a fossilize_replay process mentioned in nvidia-smi output. Would be really interesting to see how smooth it all is now out of the box, will try with a good-looking F2P game later.

Last edited by rkfg on 26 May 2020 at 11:43 am UTC
Leopard May 26, 2020
Quoting: Patola
Quoting: Leopard
Quoting: PatolaAny way to follow the shader transpilations that are occuring in the background?

Open up Steam's settings - Shader Caching

It will show an estimate time about finishing the current game it compiles shaders with showing the name of game also.
I just bought a new 8 TB disk and then moved my games logical volume to that disk and resized it from 3 to 6 TB. Then I installed basically every game I have on Steam (~620). Got only a few hundred GB left.
Judging from the pace I am seeing, it will take a few days to finish... Will it do that to every installed game?

It depends on how many shaders those games have+ if those actually have Foz pipelines cached on Steam + if you have a NV gpu or AMD

At the moment , for AMD if you click on "run the game " it will go into full blast mode which means it will do that building task multi threaded. Still single threaded on NV but hopefully should be fixed at the upcoming weeks.
Nanobang May 26, 2020
View PC info
  • Supporter
I turned off shader pre-caching so long ago because whatever benefits it was supposed to impart were offset by having it interfere, waiting for downloads just before playing a game (or something like that ... it's been so long I can't even remember what the problem was exactly) :P In fact I don't even remember what shader pre-caching was even for --- lol. Nevertheless, it sounds like this is a nice thing.

Last edited by Nanobang on 26 May 2020 at 12:38 pm UTC
FauconNoir May 26, 2020
Does it work for Windows too ? Or there is already something similar ? Just curious...
Kohrias May 26, 2020
Great feature. Thanks Valve!
gustavoyaraujo May 26, 2020
I noticed this issue on Crucible. I really want to see how it will work on my XR 5700 XT.
Purple Library Guy May 26, 2020
I'll be interested to see if people notice differences.
Leopard May 26, 2020
Quoting: Purple Library GuyI'll be interested to see if people notice differences.

I saw a huge improvement on Quake Champions which is nearly bad as Warframe and Path of Exile about shaders.

It was smooth af.Previously, it wasn't the case , lots of stutters that makes the game literally unplayable.
rkfg May 26, 2020
Quoting: GuestWhen they first introduced this shader caching/sharing thing Steam started to download hundreds of megabytes of shaders… not a very slight increase in disk and bandwidth usage, no. So I disabled it right away…
If you prefer stutter and freezes every time something new appears on screen then yeah. But I don't think it's worth it. If you play games with a lot of shaders (= AAA games) you'd better invest into a bigger and faster SSD because the rest of your hardware should already be quite good. Honestly, bad first time experience isn't worth the saved disk space.
rkfg May 26, 2020
Quoting: Guest
Quoting: rkfgIf you prefer stutter and freezes every time something new appears on screen then yeah. But I don't think it's worth it. If you play games with a lot of shaders (= AAA games) you'd better invest into a bigger and faster SSD because the rest of your hardware should already be quite good. Honestly, bad first time experience isn't worth the saved disk space.
No, I don’t have that problem. And I have 5TB of SSD for games.
It depends on the game and mostly applies to non-native ones. If you don't play them probably you're fine. But some games stutter much more than the others and if you have plenty of space why not download those caches? Also you will help other players by uploading your cache back. It's like torrents but 100% legal!
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 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.