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.
I've had the bar fill pretty quickly until the last "chunk". And then nothing happened for a minute - so then I just cancelled, the game didn't stutter anyway to begin with.
Last edited by TheSHEEEP on 27 May 2020 at 4:03 pm UTC
Very exciting stuff, this will really help out with many recent AAA games. If I update the GPU drivers does it need to process all the shaders again?Seems so. But it isn't much of a problem when it happens in the background, and only takes up one core.
So, go Steam!
Edit: oh well, it says it right there, lol: !link
i dont know the benefit of using precompiled shaders honestly
and this makes me even more happy i disabled it.
steam needs to give the option to both
A) use precompiled shaders
and
B) OPT OUT of uploading/sharing
Last edited by catbox_fugue on 30 May 2020 at 5:53 pm UTC
Edit: oh well, it says it right there, lol: !link
i dont know the benefit of using precompiled shaders honestly
and this makes me even more happy i disabled it.
steam needs to give the option to both
A) use precompiled shaders
and
B) OPT OUT of uploading/sharing
Have you noticed that some games may run at a high framerate like 100fps but then suddenly tank to 1fps for a second for no obvious reason? Well, that stutter/frame drop is often because your computer is doing shader compilation.
So what "shader pre-caching" option does, is that it shares the compiled shaders with Steam users. If anyone has previously played the game with the same GPU and driver version. Instead of your own computer having to compile the shaders while you are playing the game (there will be stutter/fps will tank while it is doing it), it will just use the precompiled downloaded shaders. Think of it like downloading pre-compiled software, instead of compiling everything yourself.
In my opinion, it is a bad idea to disable that option, even with a Threadripper CPU the stutter while playing a game during shader compilation is noticeable. But this highly depends on the game though, it is usually only in AA-AAA games this makes a noticeable difference.
I understand your concern not wanting to upload/share anything, I don't want either with my subpar broadband. The problem is just that if there was an option to opt-out, everyone would do it. This is a community feature basically, it only works if everyone using the feature shares. Think of it like torrents, you can't download anything if no one else is uploading :D
However, with that said, I think the new option to process shaders locally before running the game, should be possible to be enabled separately with the option to download/upload pre-compiled shaders. Maybe there is a technical reason why it is not, don't know :S:
Last edited by awesam on 30 May 2020 at 9:24 pm UTC
If anyone has previously played the game with the same GPU and driver version.I think it's not entirely correct, for Vulkan the GPU and driver version doesn't matter in this case. Steam can grab the platform-independent Vulkan pipelines and serialize them to upload and distribute later, they're the same for any GPU. But to use them, as @DadSchoorse explained earlier, you need to compile them to the native GPU code and it can only be done on the end user machine. This latter option is what has been added in this update and the capture layer existed for a while.
See more from me