Hello @lima-limon-inc, this is Steam's shader pre-caching subsystem, not Proton itself.
Shaders are code which is run on the GPU to render a video game. The shader pre-cache subsystem takes hardware independent shaders which have been seen in the wild with a game and feeds that into your video driver so that the video driver can convert that into hardware specific code. This is stored by the video driver in its on-disk shader cache.
Later, when the video game asks your video driver to run that code, it can skip most of the time spent compiling shader code and pull it from the video driver's on-disk shader cache. The practical effect is that stuttering is avoided whenever this happens.
The speed up you've noticed on subsequent runs is from the majority of shaders matching to your video driver's on-disk shader cache.
You can allow Steam to work ahead instead of when you start a game in Steam's settings -> Downloads -> Allow background processing of Vulkan shaders or you can disable the subsystem with the toggle just above that.
"Background processing of Vulkan shaders" only makes sense when you start Steam with the session and keep it running. I don't. I start it when I want to play a game, and terminate it when I'm done playing the game. I am not letting it sit there and consume goodness knows how much resources.
I'm not sure this is solvable by simply allowing the precaching in the background, and there seem to be an actual issue there, as for some games it indeed happen every time the game is launched. For example, Sons of the Forest.
As an example, i'm playing it on a laptop (so hardware can't change between runs), and i've compiled all the shaders before launching the game (took awhile) while being offline, then started the game again, while still being offline, so no driver or game changes happened, and yet it still did the full multiple minute long shader compilation before launch
I also have this issue on EndeavourOS. On my old Mint vulkan shaders were only compiled after a driver update or game patch. I have tried all the "fixes" I've been able to Google to no avail.
~ inxi -G ✔ 1m 33s
Graphics:
Device-1: Advanced Micro Devices [AMD/ATI] Navi 22 [Radeon RX 6700/6700
XT/6750 XT / 6800M/6850M XT] driver: amdgpu v: kernel
Display: wayland server: X.org v: 1.21.1.13 with: Xwayland v: 24.1.3
compositor: kwin_wayland driver: X: loaded: amdgpu
unloaded: modesetting,radeon dri: radeonsi gpu: amdgpu resolution:
1: 1920x1080 2: 1080x1920
API: EGL v: 1.5 drivers: kms_swrast,radeonsi,swrast
platforms: gbm,wayland,x11,surfaceless,device
API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.2.4-arch1.1
renderer: AMD Radeon RX 6700 XT (radeonsi navi22 LLVM 18.1.8 DRM 3.59
6.11.3-arch1-1)
API: Vulkan v: 1.3.295 drivers: radv surfaces: xcb,xlib,wayland
There is no closed ticket and the answer seems to answer another question.
The answer posted by @kisak-valve doesn't answer the question, and the issue persists.
Why is it that the shaders must be recompiled every single time? Why, if they've been compiled once, do they need to be done again?
Some games on Windows will compile shaders the first time you run the game, and then they never do so again. But when running under Steam, both Elite Dangerous and Hitman WoA pop up the dialog saying they're compiling the shaders. Just do it once and store the result! Why is this not happening?
I'm experiencing thtis issue with No Man's Sky. It validates for ages and also repeatedly does this. Why process every single time?
proton experimentalx1 2023-10
I've been having the following issue. Every time I open a game up, I have to wait for "Processing vulkan shaders" to end.
This process can take several minutes, if not hours.
However, after the first time you open a game up, the "Processing vulkan shaders" gets considerably faster; taking only minutes.
I was unable to find any sort of documentation on what that "Processing" even is.
My question is, what are those shaders? Why do you have to process them every time? Can't they be saved on the filesystem? Are there any side effects if one chooses to skip them?
Proton version: Proton Experimental