Announcement

Collapse
No announcement yet.

The Difference In Optimizations Between NIR & GLSL

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

  • 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

  • #2
    That's a pretty big difference.

    Comment


    • #3
      Nice comparison

      Comment


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

        Comment


        • #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


          • #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


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

              Comment


              • #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


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

                  Comment


                  • #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