Often when I launch a game through Steam that "processing Vulkan shaders" window appears and loads for a couple minutes. Sometimes it takes no time, sometimes it takes several minutes. But then, for larger games like Dune Awakening or Outer Worlds 2, the game needs to sit and process shaders for another couple minutes anyway. But for some games, like Enshrouded, I can skip the Vulkan processing with no problems in the game (I do that because the Vulkan processing doesn't go anywhere). So what is that Vulkan processing for?

you are viewing a single comment's thread
view the rest of the comments
[–] 11 points 11 months ago (15 children)

Since you seem to know way more than me about these things, could you tell me why I feel like I’ve never experienced these on a console (Playstation) and I experience it quite often on PC (Steam Deck)?

  • source
  • parent
  • hideshow 15 child comments
  • [–] 50 points 11 months ago (4 children)

    Console games only have to deal with a fixed set of hardware, so they come with precompiled shaders for that hardware. PC games don't know what they're going to run on, so the shaders are compiled on the machine where the game is played.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 5 points 11 months ago* (last edited 11 months ago) (3 children)

    So how come this is not a thing on Windows? I switched to Linux earlier this year and I see this compilation prompt each time a launch a game. But I have never seen it on Windows.

    It’s possible that I have this “use precompiled shaders” feature enabled on my Windows installation but not on Linux i guess. But I have literally never seen it on windows for any game on any launcher.

    I am also curious as to why these shaders are not just compiled once with the first installation of the game (or once per update)

  • source
  • parent
  • hideshow 3 child comments
  • [–] 18 points 11 months ago (1 child)

    Actually, a lot of modern games on Windows suffer from micro stutters and frame hitching because it’s often compiling on demand if shader compilation isn’t built in upfront in the game. A lot of games run smoother on Linux with proton because of the shader precompilation.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 15 points 11 months ago* (last edited 11 months ago) (3 children)

    I experience it quite often on PC (Steam Deck)?

    Because you disabled download of precompiled shaders off Steam after you were annoyed by these 100kb updates that tend to show up on Steam Deck more or less often. The option is only shown in the desktop UI of Steam, not in Game Mode:

  • source
  • parent
  • hideshow 3 child comments
  • [–] 9 points 11 months ago (1 child)

    Oh so that’s what those little updates are that always seem to pop up? Good to know!

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 11 months ago

    Oh so that’s what those little updates are that always seem to pop up? Good to know!

    There are others as well but on Steam Deck the shaders are by far the most prominent of those. I'm not sure what the others are and how many of those are because the developer changed anything or if some are autogenerated by something on the Steam store back-end.

  • source
  • parent
  • [–] 2 points 11 months ago* (last edited 11 months ago) (2 children)

    Every unit of a given console contains the same graphics hardware, so a single version of a game's shaders can be compiled and shipped with the game, and they will run on every console of its kind.

    (Also, early consoles didn't use shaders.)

    PC graphics hardware varies a lot, so shipping precompiled shaders with the game would require the developers to collect samples of all the world's PC GPU families, compile the game's shaders for each one, and ship all those compiled versions of all those shaders with the game. That would be impractical.

    (The variance is arguably even greater in Linux gaming, which often involves graphics API translation, which can affect compiled shaders.)

    It could be done for the Steam Deck, since every Deck has the same graphics hardware, if game developers & publishers were willing to make and distribute Deck-specific builds. However, that would rather defeat the Deck's advantage of being able to run just about any PC game unmodified. Steam's "processing Vulkan shaders" step is designed to more or less accomplish the same thing, at least for popular games.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 11 months ago* (last edited 11 months ago) (1 child)

    It could be done for the Steam Deck, since every Deck has the same graphics hardware, if game developers & publishers were willing to make and distribute Deck-specific builds.

    Valve does it. They show up as updates and get downloaded off Steam. It's optional but it's enabled by default. Parent poster has disabled it at some point and forgot about it.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 4 points 11 months ago* (last edited 11 months ago)

    The last sentence of the comment to which you replied covers this. What Valve does here is not the same thing, since it doesn't involve the game developer or publisher, and doesn't work for non-Steam games, and happens as an extra step. But it does come close to achieving the same effect (when it works), and it is pretty cool.

    Edit: Graphics software enthusiasts who find the process interesting might want to check this out:

    https://github.com/ValveSoftware/Fossilize

  • source
  • parent
  • [–] 2 points 11 months ago* (1 child)

    Steam Deck usually has precomputed shaders as well, so it's unclear why you're having that problem on Steam Deck, unless you are running an unusual os. I suppose they could be less mainstream games, too.

    Maybe if you are using a beta of proton or similar that could case it too.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 11 months ago*

    I, for one, enjoy continuing to run every single weird kind of windows program through Proton Expirimental, on my Deck, running on Bazzite.

    I may have escaped GlAdOS, but I'll be damned if I ever stop testing.

  • source
  • parent