Announcement

Collapse
No announcement yet.

Renewed Interest In Background, Parallel Shader Compilation For Mesa

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

  • Renewed Interest In Background, Parallel Shader Compilation For Mesa

    Phoronix: Renewed Interest In Background, Parallel Shader Compilation For Mesa

    Prolific Mesa contributor Ilia Mirkin has taken initial steps towards working on parallel shader compiles in Mesa...

    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
    thread and memory safety? Write it in rust? seems like the obvious thing to suggest though it may or many not be right... Mesa already uses LLVM heavily... so I don't see why not.

    Comment


    • #3
      ...he will pursue a design where only threading will be enabled when delivers set the ARB_parallel_shader_compile support and that initially will be off by default for users until all issues are worked out.
      That is supposed to be drivers, yeah? couldn't come up with other words that made sense in that context.

      Comment


      • #4
        Originally posted by GabrielYYZ View Post

        That is supposed to be drivers, yeah? couldn't come up with other words that made sense in that context.
        Yep, fixed. Thanks.
        Michael Larabel
        https://www.michaellarabel.com/

        Comment


        • #5
          Originally posted by cb88 View Post
          thread and memory safety? Write it in rust? seems like the obvious thing to suggest though it may or many not be right... Mesa already uses LLVM heavily... so I don't see why not.
          All the current Mesa OpenGL function implementations are in C. Adding another language for just one extension (or even worse, to try to compartmentalize the C functions that compile shaders) adds a huge number of build dependences and build chain steps to make the Rust parts.

          If you were starting an OpenGL implementation from scratch today, I do not think there is any other valid consideration besides Rust (cough, Vulkan). But when you already have a huge C codebase, mixing more languages into that can of course work, but its a lot of headaches.

          Though honestly it might be less headaches than writing even one file of C in my experience. But that is why they wouldn't do it.

          Comment


          • #6
            Originally posted by zanny View Post

            All the current Mesa OpenGL function implementations are in C. Adding another language for just one extension (or even worse, to try to compartmentalize the C functions that compile shaders) adds a huge number of build dependences and build chain steps to make the Rust parts.

            If you were starting an OpenGL implementation from scratch today, I do not think there is any other valid consideration besides Rust (cough, Vulkan). But when you already have a huge C codebase, mixing more languages into that can of course work, but its a lot of headaches.

            Though honestly it might be less headaches than writing even one file of C in my experience. But that is why they wouldn't do it.
            Rust is designed to work with C and most of the dependencies are already required. https://doc.rust-lang.org/book/ffi.html

            I agree in principle on the build dependencies issue though... it is nice to just install GCC and thats all you need.

            Comment


            • #7
              Thanks a lot for this, Ilia

              Comment


              • #8
                Hmm ...just curious...what is the expected performance gain out of this (in percentage)?

                Comment


                • #9
                  Originally posted by Adriannho View Post
                  Hmm ...just curious...what is the expected performance gain out of this (in percentage)?
                  I would imagine probably not much .... but also probably improved latency (less lag). And possibly faster startup/warmup of the rendering pipeline.

                  Comment


                  • #10
                    Originally posted by cb88 View Post
                    thread and memory safety? Write it in rust? seems like the obvious thing to suggest though it may or many not be right... Mesa already uses LLVM heavily... so I don't see why not.
                    you mean REwrite it in rust. noone is crazy enough to rewrite perfectly working software even if it is not as developer-starved as mesa. actually it is number one problem with all toy languages advertised as replacement for something

                    Comment

                    Working...
                    X