Announcement

Collapse
No announcement yet.

OpenGL Arrays of Arrays Code Finally Landing In Mesa

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

  • OpenGL Arrays of Arrays Code Finally Landing In Mesa

    Phoronix: OpenGL Arrays of Arrays Code Finally Landing In Mesa

    Two years after starting work on the Arrays of Arrays support via crowd-funding, Timothy Arceri pushed a bulk of the work into mainline 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
    Congratulations Timothy, and congratulations to us! I'm glad I've pitched in on both your indiegogo's!

    Comment


    • #3
      Hurray! I have too contributed to both your indigogo's. Congratulations.

      Comment


      • #4
        So what exactly is still needed to make the AoA code work with different GPUs? Does the preliminary Mesa support mean that there's some API stuff and generic infrastructure in place? Even the softpipe/llvmpipe approach still requires extra code? What about intel/nvidia/amd drivers?

        Comment


        • #5
          As far as I understand it, this extension is not hardware-specific at all. You can easily convert a multi-dimensional array into a single-dimension array:

          // multi-dimension
          vec4 aoa[4][5];
          aoa[1][2] = vec4(3.0);
          // single-dimension
          vec4 arr[4*5];
          arr[1*5 +2] = vec4(3.0);

          Multi-dimensional arrays are just syntactic sugar, aren't they? This is why I'm surprised about how long it took to implement this feature. Probably I'm wrong, but someone please explain why.

          Comment


          • #6
            Out of curiosity, what currently uses this? I'm not bashing anything here I'm legitimately wondering. I find it a little weird people would fund this specific feature.

            Comment


            • #7
              Originally posted by schmidtbag View Post
              Out of curiosity, what currently uses this? I'm not bashing anything here I'm legitimately wondering. I find it a little weird people would fund this specific feature.
              AFAIK Shadow of Mordor uses AoA in one of their tessellation shaders, but I think it was kind of unclear whether it was truly AoA or if the written array was already allowed under ARB_tessellation_shader. More details: https://bugs.freedesktop.org/show_bug.cgi?id=92059

              Of course, as with many other GL4 features, almost nobody uses them (yet), they're just there because the hardware is capable of doing it (best example: double precision). I don't know, maybe some CAD folks do.

              That's why there's really not much point in getting specific GL versions done; it's much more productive to focus on the parts that are actually in use (like compute), and then a properly written engine should just query extensions for everything it needs instead of setting a hard limit on GL version X.Y

              Comment


              • #8
                Originally posted by jf33 View Post
                As far as I understand it, this extension is not hardware-specific at all. You can easily convert a multi-dimensional array into a single-dimension array:

                // multi-dimension
                vec4 aoa[4][5];
                aoa[1][2] = vec4(3.0);
                // single-dimension
                vec4 arr[4*5];
                arr[1*5 +2] = vec4(3.0);

                Multi-dimensional arrays are just syntactic sugar, aren't they? This is why I'm surprised about how long it took to implement this feature. Probably I'm wrong, but someone please explain why.
                They are also supported for shader inputs/outputs, which complicates things I think (especially when you are inexperienced with the codebase).

                Comment


                • #9
                  Originally posted by schmidtbag View Post
                  Out of curiosity, what currently uses this? I'm not bashing anything here I'm legitimately wondering. I find it a little weird people would fund this specific feature.
                  I just chucked a bit of money at it because someone was contributing to Mesa. If Timothy didn't work on this, someone else would ultimately have to. Someone else can now work on another Mesa feature instead!

                  Comment


                  • #10
                    Originally posted by schmidtbag View Post
                    I find it a little weird people would fund this specific feature.
                    Timothy choose this feature for reason. It's was one of few pieces that remain unimplemented, can be done by developer who's relatively new to Mesa and in same time nobody was working on it at moment.

                    Comment

                    Working...
                    X