Announcement

Collapse
No announcement yet.

Mesa's Shader Cache Is In The Process Of Landing

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

  • Mesa's Shader Cache Is In The Process Of Landing

    Phoronix: Mesa's Shader Cache Is In The Process Of Landing

    Intel developers are in the process of landing their GLSL shader cache into mainline Mesa...

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

  • #2
    Is it likely this work can be easily ported to radeon and nouveau drivers?

    Comment


    • #3
      Originally posted by ua=42 View Post
      Is it likely this work can be easily ported to radeon and nouveau drivers?
      I think the initial implementations were 100% fully shared, with no custom driver code needed at all. If there is some, i'd expect it to be pretty minimal.
      Last edited by smitty3268; 16 January 2015, 10:19 PM.

      Comment


      • #4
        Originally posted by ua=42 View Post
        Is it likely this work can be easily ported to radeon and nouveau drivers?
        As article explains, no actual code was added, they just prepped build system for future use of it.

        Comment


        • #5
          Nice, this should help with keeping stutters down.

          Comment


          • #6
            Originally posted by GreatEmerald View Post
            Nice, this should help with keeping stutters down.
            ...or it will increase them if you're on a HD and it is busy.

            Comment


            • #7
              Originally posted by curaga View Post
              ...or it will increase them if you're on a HD and it is busy.
              Well, I can't assume that someone could expect games to be fluid on loaded machine.

              Comment


              • #8
                Originally posted by Drago View Post
                Well, I can't assume that someone could expect games to be fluid on loaded machine.
                The load could very well be caused by the game itself.

                Comment


                • #9
                  It depends. If the game/app compiles shaders on the fly, there may still be stutter, and there's little a driver can do about that. When apps are done right, all shader permutations should be pre-compiled at load time though (in my engines I render just a few pixels with each shader at load time just to ensure the driver doesn't cheat and defer compilation/linking). But for (NV and other vendors) that already cache, there will also be stutter in that situation (depending on raw compilation speed, which may vary across vendors). Don't forget there was a time when NV re-compiled shaders on the fly when a uniform value was updated (I think in cases of branching on older 'pre-branching' hardware), this was obviously bad for performance but still surprisingly acceptable (IMO). Most GLSL compilers are really fast by now. It is probably only the big, complex shaders with lots of branching that will should stutter when compiled on the fly.

                  I wonder why SHA-1 was chosen over MD5? The latter might be that wee bit faster that might hide any remaining stutter to disappear in natural framerate fluctuations. I don't think collisions are an issue given the typical nature of GLSL code (and neither is security). I guess typical shaders aren't that much data to hash, so the performance difference may be lost in the overhead.
                  Last edited by Remdul; 17 January 2015, 07:26 AM.

                  Comment


                  • #10
                    I think it might be worth to look into what browser guys are doing.

                    Something like a really fast first time quick non-optimised compilation, plus a full optimisation pass done asynchronously.

                    Comment

                    Working...
                    X