Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Processing vulkan shaders every time I launch a game
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gamers & Players
View previous topic :: View next topic  

What's your experience with Processing vulkan shaders?
I get that screen every time I open a game. It always takes the same amount of time
16%
 16%  [ 1 ]
I get that screen every time I open a game. It takes less time after subsequent launches.
16%
 16%  [ 1 ]
I got that screen only the first time I launched a game.
33%
 33%  [ 2 ]
I've never gotten that screen.
33%
 33%  [ 2 ]
I have deactivated them
0%
 0%  [ 0 ]
Total Votes : 6

Author Message
Lemon-Lime
n00b
n00b


Joined: 27 Apr 2023
Posts: 58

PostPosted: Fri Oct 13, 2023 12:22 am    Post subject: Processing vulkan shaders every time I launch a game Reply with quote

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. Only vague reddit threads/steam threads, namely:
-
https://steamcommunity.com/discussions/forum/1/3279194062595915652/
-
https://www.reddit.com/r/linux_gaming/comments/12eib4y/processing_vulkan_shaders_every_time/

However, there are no concrete answers, only hypothesis and guesses. The
steam thread was even closed by a valve employee, yet I saw no concrete
answers.

My question is, what are those shaders? Why do you have to process them
every time? Can't they be saved on the filesystem?

Plus, I saw that there is a proton ebuild (nice!)
https://packages.gentoo.org/packages/app-emulation/wine-proton.
What's the purpose of this ebuild?
According to Valve, you can use your own proton build in steam
https://steamcommunity.com/games/221410/announcements/detail/1696055855739350561.
Quote:
If you're familiar with building open source projects, you can
even make your own local builds of Proton; the Steam client has support
for using those to run games in lieu of the built-in version. Join the
discussion in the issue tracker and share your patches and testing
results with the rest of the community!


Can I use the proton from the ebuild? If I do, will it stop asking me to
process the shaders every time?

PS: I really really like what valve is doing with Linux! I truly think
their work is amazing and really appreciate the development efforts they
have put into Proton/Wine.
I just want to know what this shaders do.

Thanks in advance
_________________
Crazy frog is the artist, not the song


Last edited by Lemon-Lime on Fri Oct 13, 2023 2:58 am; edited 2 times in total
Back to top
View user's profile Send private message
papu
l33t
l33t


Joined: 25 Jan 2008
Posts: 735
Location: Sota algun pi o alzina...

PostPosted: Fri Oct 13, 2023 2:00 am    Post subject: Reply with quote

deactivate and all will be fine again!

i used to use that but is a trash , it's very much fast without than with just try

shaders it suppose to be pre-load grafics that helps to game later, but in my experience it's useless

steam settings----downloads----shader pre-caching---all switched off
_________________
~amd64 & openrc --cpu 7700 non-x --ram 2x16GB --gpu RX 6600
Back to top
View user's profile Send private message
Lemon-Lime
n00b
n00b


Joined: 27 Apr 2023
Posts: 58

PostPosted: Fri Oct 13, 2023 2:54 am    Post subject: Reply with quote

papu wrote:
deactivate and all will be fine again!

i used to use that but is a trash , it's very much fast without than with just try

shaders it suppose to be pre-load grafics that helps to game later, but in my experience it's useless

steam settings----downloads----shader pre-caching---all switched off

I see, thanks for the feedback.

Do you know of any documentation on what they are?
_________________
Crazy frog is the artist, not the song
Back to top
View user's profile Send private message
steve_v
Guru
Guru


Joined: 20 Jun 2004
Posts: 416
Location: New Zealand

PostPosted: Fri Oct 13, 2023 7:12 am    Post subject: Reply with quote

Pre-launch "shader processing" exists to reduce in-game framerate drops caused by on-demand shader compilation (and translation from DX to Vulkan). IIRC steam enables it by default when using proton, some games implement similar functionality internally as well.
Shader caching will still take place regardless of whether it's enabled or not, the difference is in whether shaders are compiled and cached at startup or when they're needed. In the past there were some deficiencies in wine/dxvk handling of shader compilation and disk caches, which is likely why steam added this.

Much improvement has been made to both shader compile performance (see dxvk-async, dxvk readme and 2.1 release notes, mesa enabling gpl) and on-disk cache management of late, so unless you're actually suffering from shader compile "stutters" in-game it's likely no longer needed and quite safe to disable.
Steam's shader precaching can even be counterproductive in some cases, as it may interfere with (causing double-caching / evictions) DXVK caching.

As to what a shader is... you could just ask wikipedia or some other reputable source instead of grubbing about in the garbage dump of reddit and steam comments. :roll:
_________________
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.
Back to top
View user's profile Send private message
RbMlWIzard
n00b
n00b


Joined: 24 Aug 2024
Posts: 1

PostPosted: Sat Aug 24, 2024 1:24 am    Post subject: Re: Processing vulkan shaders every time I launch a game Reply with quote

Lemon-Lime wrote:
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. Only vague reddit threads/steam threads, namely:
-
https://steamcommunity.com/discussions/forum/1/3279194062595915652/
-
https://www.reddit.com/r/linux_gaming/comments/12eib4y/processing_vulkan_shaders_every_time/

However, there are no concrete answers, only hypothesis and guesses. The
steam thread was even closed by a valve employee, yet I saw no concrete
answers.

My question is, what are those shaders? Why do you have to process them
every time? Can't they be saved on the filesystem?

Plus, I saw that there is a proton ebuild (nice!)
https://packages.gentoo.org/packages/app-emulation/wine-proton.
What's the purpose of this ebuild?
According to Valve, you can use your own proton build in steam
https://steamcommunity.com/games/221410/announcements/detail/1696055855739350561.
Quote:
If you're familiar with building open source projects, you can
even make your own local builds of Proton; the Steam client has support
for using those to run games in lieu of the built-in version. Join the
discussion in the issue tracker and share your patches and testing
results with the rest of the community!


Can I use the proton from the ebuild? If I do, will it stop asking me to
process the shaders every time?

PS: I really really like what valve is doing with Linux! I truly think
their work is amazing and really appreciate the development efforts they
have put into Proton/Wine.
I just want to know what this shaders do.

Thanks in advance


This issue has been fixed and it was because Steam was using only 1 cpu core and threads for shader compilation.
Issue: Shader caching takes forever in Linux.
Status:

FIXED: Original Credit to :Deleted user on reddit 

Finally found a fix so i am going to post this in these legacy reddit threads for future readers.
Thanks to another user because gaming on linux was unplayable to me because it took forever for the shaders to process every-time i started a game.

Solution:
Access File Manager or (use Terminal) to go to

Go to the directory: `.local/share/steam`

If using File Manager, Display Hidden Files:
Press `Ctrl+H` to reveal hidden files.

Navigate to Steam Configuration Directory:

For Non-Flatpak Installations:
Go to the directory: `.local/share/steam`
You should see folders like `appcache`, `bin`, `clientui`, `compatibilitytools.d`, `config`, etc.

For Flatpak Installations:
Navigate to: `.var/app/com.valvesoftware.Steam/data/Steam`


Create a file named `steam_dev.cfg` in the directory.

Open `steam_dev.cfg` with any text editor.

Add the following line to the file:

unShaderBackgroundProcessingThreads X.

note: # (un not run please care for typo)

Replace `X` with the number of threads your CPU supports.

For example:
-e .g. If , For an Intel i9-13900K (32 threads), use `32`.
So, unShaderBackgroundProcessingThreads 32
-e.g. If For a Ryzen 5 4600 (12 threads), use `12`.
unShaderBackgroundProcessingThreads 12

5. Save and Close the File:
Save your changes and close the text editor.
Restart Steam

Go to Steam settings
Allow Shader Pre-Caching

(Optional You can turn this on too because hyperthreading makes it really quick on modern processors, literally few seconds.) Allow background Processing of Vulkan shaders.
Since i am using a 12th gen cpu the shader loader time are virtually gone, literally 1 seconds.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gamers & Players All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum