Announcement

Collapse
No announcement yet.

Mesa Lands New Single File Cache To Help Steam's Pre-Compiled Shaders, Space Savings

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mesa Lands New Single File Cache To Help Steam's Pre-Compiled Shaders, Space Savings

    Phoronix: Mesa Lands New Single File Cache To Help Steam's Pre-Compiled Shaders, Space Savings

    Mesa's on-disk shader cache, which is used for speeding up game load times by avoiding the redundant recompiling of shaders on successive loads and also helping performance for software that compiles shaders on-the-fly, is seeing a big improvement with Mesa 21.1. Mesa 21.1-devel merged this weekend the new single file cache implementation...

    http://www.phoronix.com/scan.php?pag...gle-File-Cache

  • #2
    Hm, I never really understood that shader preloading in steam. Aren't shaders driver specific in the sense that they must match exactly the mesa version I'm running on? And since I'm often on mesa from git, it'd recompile everything anyway?

    But probably I'm mistaken here ...

    Comment


    • #3
      Originally posted by mazumoto View Post
      Hm, I never really understood that shader preloading in steam. Aren't shaders driver specific in the sense that they must match exactly the mesa version I'm running on? And since I'm often on mesa from git, it'd recompile everything anyway?

      But probably I'm mistaken here ...
      You’re spot on. It can only make a difference if you run the exact same build of Mesa as others before you. I.e. not for people which build Mesa themselves (which is probably a small minority).

      Comment


      • #4
        Originally posted by mazumoto View Post
        Hm, I never really understood that shader preloading in steam. Aren't shaders driver specific in the sense that they must match exactly the mesa version I'm running on? And since I'm often on mesa from git, it'd recompile everything anyway?

        But probably I'm mistaken here ...
        I've been wondering the same thing too. Am I just wasting bandwidth downloading these? Why do they get updated so often? It's not because I've updated Mesa because it happens more frequently than that.

        Comment


        • #5
          This sounds like a welcome change to me. But like others pointed out, too bad you have to keep re-downloading the caches.

          Comment


          • #6
            Originally posted by mazumoto View Post
            But probably I'm mistaken here ...
            your only mistake is to assume that valve handles you rather than majority of their users

            Comment


            • #7
              Originally posted by schmidtbag View Post
              But like others pointed out, too bad you have to keep re-downloading the caches.
              it's unclear what part of it is bad. alternative to downloading precompiled ones is local compilation, which is much longer

              Comment


              • #8
                Originally posted by MrCooper View Post
                You’re spot on. It can only make a difference if you run the exact same build of Mesa as others before you. I.e. not for people which build Mesa themselves (which is probably a small minority).
                Actually Steam has 2 caches:

                1. That caches shader binaries and indeed has the problems you pointed out.
                2. A cache that stores the pipelines for Vulkan replay. These can be compiled before launching the game to avoid stutter.

                Comment


                • #9
                  Originally posted by pal666 View Post
                  your only mistake is to assume that valve handles you rather than majority of their users
                  Please post a link to Valve's global statistics about shader caches in Steam Linux clients. Without data, any opinion is just as good as your opinion, irrespective of whether those opinions are contradictory.

                  Comment


                  • #10
                    AppID 391220 (Rise of the Tomb Raider):

                    Code:
                    $ du -bs mesa_shader_cache mesa_shader_cache_sf
                    211,528,480  mesa_shader_cache      <--- old cache (77719 files)
                     95,370,616  mesa_shader_cache_sf   <--- newly created single-file cache (3 files)
                    Last edited by atomsymbol; 21 February 2021, 03:52 PM. Reason: Note: The old cache doesn't contain any stale entries

                    Comment

                    Working...
                    X