Announcement

Collapse
No announcement yet.

Mesa Shader Compiler Cache Proposed, Reduces Game Start Times

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

  • Mesa Shader Compiler Cache Proposed, Reduces Game Start Times

    Phoronix: Mesa Shader Compiler Cache Proposed, Reduces Game Start Times

    Similar to functionality offered by other drivers, Mesa might finally have a shader compiler cache to save compiled GLSL shaders to the disk in an effort to reduce the start-up time for modern Linux games...

    http://www.phoronix.com/vr.php?view=MTcwNzk

  • #2
    Any use for this outside of games?

    Comment


    • #3
      Originally posted by droidhacker View Post
      Any use for this outside of games?
      KDE and GNOME loading faster?

      Comment


      • #4
        not quite accurate

        Originally posted by phoronix
        Tapani Pälli of Intel's Open-Source Technology Center sent out the initial set of 20 patches
        This isn't the initial set, that came out a long time ago. (maybe a year?)

        They've been getting quite a bit of pushback from some of the devs, so hopefully this version can finally go in. Notice that some of the patches already have reviewed-by tags.

        Comment


        • #5
          Originally posted by siavashserver View Post
          KDE and GNOME loading faster?
          As much of a bloated pig as those both are (expecially gnome), I use MATE.
          Though I couldn't imagine anything coming out of a DE being so complex that it would make any measurable difference. Might even make it worse by adding in some disk latency.

          Comment


          • #6
            Originally posted by droidhacker View Post
            As much of a bloated pig as those both are (expecially gnome), I use MATE.
            Though I couldn't imagine anything coming out of a DE being so complex that it would make any measurable difference. Might even make it worse by adding in some disk latency.
            I've noticed major differences in GDM and Gnome Shell start-up time depending on whether I've built mesa/llvm with debug symbols, asserts, and -O0, as opposed to a release build for my Radeon 7850. I'm hoping that a shader cache will allow me to get quick start-up times for my desktop, while still letting me keep the rest of my development environment intact.

            Comment


            • #7
              This shouldn't make much of an impact on Desktop Environments. I can't imagine they would have more complicated stuff than "main() { gl_FragColor = v_color; }".

              Comment


              • #8
                Originally posted by Ancurio View Post
                This shouldn't make much of an impact on Desktop Environments. I can't imagine they would have more complicated stuff than "main() { gl_FragColor = v_color; }".
                You underestimate the amount of fancy effects in current DEs.

                Comment


                • #9
                  Originally posted by Ancurio View Post
                  This shouldn't make much of an impact on Desktop Environments. I can't imagine they would have more complicated stuff than "main() { gl_FragColor = v_color; }".
                  Isn't Plasma2 going to be using hardware acceleration wherever possible thanks to QtQuick2/QML or something? I wonder what those Qt libs use to do hardware accel...
                  But yeah, Gnome/KDE use OpenGL to get hardware acceleration wherever it makes sense, so we could get a speedup of at the very minimum 1-2 seconds for startup. Not much, but slightly noticeable (again, at the very minimum)

                  Less-fancy DEs shouldn't really be affected by this...

                  Comment


                  • #10
                    hm

                    use a ssd and the de start in sec

                    Comment


                    • #11
                      Any improvements on non-Steam, free/libre games? I doubt the graphic driver matters there.

                      Comment


                      • #12
                        Originally posted by Calinou View Post
                        Any improvements on non-Steam, free/libre games? I doubt the graphic driver matters there.
                        Still plenty of games that use shaders.

                        Currently, all those shaders are compiled every time they need to be used (unless game keep track of compiled shaders, but then linking on recombining them still take time), recent changes to Mesa that landed added in-RAM cache for it (so game do not need to keep track, but still on restart of OS, cache is lost), now we will get persistent cache.

                        All of that is very, very good. Especially on single threaded apps, where shader compilation stalled all the other jobs.

                        Comment


                        • #13
                          Is this for all drivers or only for intel? Will it work automatically?

                          Comment


                          • #14
                            Originally posted by zoomblab View Post
                            Is this for all drivers or only for intel? Will it work automatically?
                            This patchset applies to the GLSL compiler so this include the Gallium drivers.
                            But currently this patchset is broken for Gallium. The author is trying to fix it.

                            AFAIK, in order to work, the game must explicitly tells the driver to cache the shaders. This is the case for Left 4 Dead 2 for instance. Some games, like ETQW, Xonotic, 0AD, etc., doesn't do that.

                            Comment


                            • #15
                              Originally posted by whitecat View Post
                              AFAIK, in order to work, the game must explicitly tells the driver to cache the shaders. This is the case for Left 4 Dead 2 for instance. Some games, like ETQW, Xonotic, 0AD, etc., doesn't do that.
                              That's how you use the GL extension (ARB_get_program_binary), which is part of GL4.1. This patchset, however, does add an automatic cache that's used regardless of whether the apps ask for it or not, and isn't standard GL at all - just something extra that's easy to add on once you are able to do so. NVidia's driver does the same thing.

                              Comment

                              Working...
                              X