Announcement

Collapse
No announcement yet.

RadeonSI On-Disk Shader Cache Lands In Mesa Git

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

  • RadeonSI On-Disk Shader Cache Lands In Mesa Git

    Phoronix: RadeonSI On-Disk Shader Cache Lands In Mesa Git

    Taking things further than the recent landing of the TGSI on-disk shader cache for this Gallium3D IR, Timothy Arceri at Valve has landed his support for a RadeonSI driver on-disk shader cache...

    http://www.phoronix.com/scan.php?pag...ader-Cache-Git

  • #2
    For anyone who wants to try it, it's present, but currently disabled by default for both TGSI caching and binary shader caching in radeonsi.

    You can enable it by setting the following environment variable or including it in the command line of the program you want to run:
    MESA_GLSL_CACHE_ENABLE=1

    Comment


    • #3
      I am guessing we can expect some benchmarks with this on and off in the near future Michael? (pretty please) no cache, cache enabled with that shiny new "time is a benchmark" option in PTS ?

      Comment


      • #4
        Originally posted by boxie View Post
        I am guessing we can expect some benchmarks with this on and off in the near future Michael? (pretty please) no cache, cache enabled with that shiny new "time is a benchmark" option in PTS ?
        Yep once I am done with initial Ryzen tests. And yes, that is why I added the "time is a benchmark" option to PTS, good reading
        Michael Larabel
        http://www.michaellarabel.com/

        Comment


        • #5
          Please note that currently switching between 32bit and 64bit apps will blow the cache away which is why this is still not enabled by default. There are a few solutions for this, hopefully we can land something soon.

          Comment


          • #6
            Originally posted by Veerappan View Post
            For anyone who wants to try it, it's present, but currently disabled by default for both TGSI caching and binary shader caching in radeonsi.

            You can enable it by setting the following environment variable or including it in the command line of the program you want to run:
            MESA_GLSL_CACHE_ENABLE=1
            Here are some numbers taken from Mesa git commit:

            util/disk_cache: compress individual cache entries

            This reduces the cache size for Deus Ex from ~160M to ~30M for
            radeonsi (these numbers differ from Grigori's results below
            probably due to different graphics quality settings).

            I'm also seeing the following improvements in minimum fps in the
            Shadow of Mordor benchmark on an i5-6400 CPU@2.70GHz, with a HDD:

            no-cache: ~10fps
            with-cache-no-compression: ~15fps
            with-cache-and-compression: ~20fps

            Note: The with cache results are from the second run after closing
            and opening the game to avoid the in-memory cache.

            Since we mainly care about decompression I went with
            Z_BEST_COMPRESSION as suggested on irc by Steinar H. Gunderson
            who has benchmarked decompression speeds.

            Grigori Goronzy provided the following stats for Deus Ex: Mankind
            Divided start-up times on a Athlon X4 860k with a SSD:

            No Cache 215 sec

            Cold Cache zlib BEST_COMPRESSION 285 sec
            Warm Cache zlib BEST_COMPRESSION 33 sec

            Cold Cache zlib BEST_SPEED 264 sec
            Warm Cache zlib BEST_SPEED 33 sec

            Cold Cache no compression 266 sec
            Warm Cache no compression 34 sec

            The total cache size for that game is 48 MiB with BEST_COMPRESSION,
            56 MiB with BEST_SPEED and 170 MiB with no compression.

            These numbers suggest that it may be ok to go with Z_BEST_SPEED
            but we should gather some actual decompression times before doing
            so. Other options might be to do the compression in a separate
            thread, this might allow us to use a higher compression algorithim
            such as LZMA.
            Even on my OLD Radeon HD 6670 (Turks XT) 2 GB (r600g) I get doubled speed with LS2015 during startup.
            Compression halved the ~/.cache/mesa dir size.

            GREAT work Timothy!

            Greetings,
            Dieter

            Comment


            • #7
              Originally posted by tarceri View Post
              Please note that currently switching between 32bit and 64bit apps will blow the cache away which is why this is still not enabled by default. There are a few solutions for this, hopefully we can land something soon.
              Can't wait to see...;-)

              Comment


              • #8
                Originally posted by tarceri View Post
                Please note that currently switching between 32bit and 64bit apps will blow the cache away which is why this is still not enabled by default. There are a few solutions for this, hopefully we can land something soon.
                Yeah, I saw that... I've been overriding make check for my 32-bit builds (on a 64-bit host) for a while now, and I'm hoping that the next series of updates will take care of that... Still trying to track down what's actually happening there.

                Comment


                • #9
                  Is it limited to a single application only? Seems like the whole cache is blown out, after running a different game (both 64-bit).

                  Shadwen does load faster.

                  Comment


                  • #10
                    Originally posted by shmerl View Post
                    Is it limited to a single application only? Seems like the whole cache is blown out, after running a different game (both 64-bit).

                    Shadwen does load faster.
                    If you rebuild Mesa or LLVM it will also delete the cache the next time you run an app.
                    Last edited by tarceri; 03-03-2017, 03:13 AM.

                    Comment

                    Working...
                    X