The Difference In Optimizations Between NIR & GLSL

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • phoronix
    Administrator
    • Jan 2007
    • 67391

    The Difference In Optimizations Between NIR & GLSL

    Phoronix: The Difference In Optimizations Between NIR & GLSL

    One of the biggest additions to Mesa so far this year has been the introduction of NIR, the new intermediate representation designed to replace GLSL IR and designed by a bright student fresh out of high school...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite
  • Dukenukemx
    Senior Member
    • Nov 2010
    • 1396

    #2
    That's a pretty big difference.

    Comment

    • gQuigs
      Senior Member
      • Apr 2008
      • 171

      #3
      Nice comparison

      Comment

      • Ancurio
        Senior Member
        • Aug 2011
        • 928

        #4
        Connor also helped design SPIR-V, which apparently is a lot like a "serialized form of NIR".

        Comment

        • stalkerg
          Senior Member
          • May 2011
          • 214

          #5
          (('fpow', a, 4.0), ('fmul', ('fmul', a, a), ('fmul', a, a)))
          It is python code, maybe I can translate it to GLSL IR optimization.

          Comment

          • Drago
            Senior Member
            • Aug 2009
            • 799

            #6
            Originally posted by Ancurio View Post
            Connor also helped design SPIR-V, which apparently is a lot like a "serialized form of NIR".
            Are you sure about that? As I heard, they are nothing alike.

            Comment

            • GreatEmerald
              Senior Member
              • Sep 2008
              • 3686

              #7
              The GLSL one sure is more understandable. Though I guess for an IR it's better to be brief than understandable...

              Comment

              • Marc Driftmeyer
                Senior Member
                • Oct 2012
                • 1502

                #8
                Tell me the benefit of a higher level of abstraction via Python all in the name of saving some code snippets that can be reused over GLSL which is just a higher level abstraction language with C syntax.

                More importantly, it seems to be a waste of time when Vulkan API and it's own SPIR IR with LLVM-IR is already the pathway forward.

                I can see using this for Blender add-ons.

                Comment

                • -jK-
                  Junior Member
                  • Jul 2012
                  • 9

                  #9
                  o_O
                  where is the optimization for pow(x, 16.0), pow(x, 5.0), ...?

                  Comment

                  • Ericg
                    Senior Member
                    • Aug 2012
                    • 2585

                    #10
                    Originally posted by Marc Driftmeyer View Post
                    More importantly, it seems to be a waste of time when Vulkan API and it's own SPIR IR with LLVM-IR is already the pathway forward.
                    Its not definitive yet whether Vulkan will fully supplant OpenGL. Vulkan may end up being used when maximum performance is necessary, and OpenGL being used whenever its not performance-critical. It takes a lot to get Vulkan up off of the ground for a program. Rendering a triangle in OpenGL was something like 60 lines of code, with Vulkan being 600 or so.
                    All opinions are my own not those of my employer if you know who they are.

                    Comment

                    Working...
                    X