Announcement

Collapse
No announcement yet.

Experimental PRIME Support For Wayland

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

  • Experimental PRIME Support For Wayland

    Phoronix: Experimental PRIME Support For Wayland

    PRIME, the DRI2 offloading implementation, is beginning to be brought up under Wayland...

    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
    you forgot to point out this was a AMD and intel Card running at the same time the intel card was doing the DE wayland/weston why the AMD card was doing all the hard work i see this being really good for Gaming Rendering Power Saving etc

    Comment


    • #3
      so, this is basically the Radeon/wayland equivalent of bumblebee for NVidia/X.org, right?

      Comment


      • #4
        Originally posted by dstaubsauger View Post
        so, this is basically the Radeon/wayland equivalent of bumblebee for NVidia/X.org, right?
        I thought bumblebee/Nvidia optimus switched from one gpu to another where as this appears to be using both at the same time ??

        Comment


        • #5
          Originally posted by dstaubsauger View Post
          so, this is basically the Radeon/wayland equivalent of bumblebee for NVidia/X.org, right?
          This is support for PRIME, which we have in Xorg since 1.13(september 2012). PRIME should be faster than bumblebee because it utilizes dma_buf kernel feature.

          Comment


          • #6
            Originally posted by nslqqq View Post
            This is support for PRIME, which we have in Xorg since 1.13(september 2012). PRIME should be faster than bumblebee because it utilizes dma_buf kernel feature.
            I didn't think PRIME was part of the core X11 support?
            I thought prime was basically a compiled libGL.so which took sys calls and redirected it to the secondary GPU (after powering it up of course), and using the extra libraries defined in /etc/bumblebee/bumblebee.conf (path typed from memory).

            It does perform better than VirtualGL-bumblebee (using a second 'virtual' Xorg display and copying it across), although doesn't work in all situations (nvidia-settings etc).

            I am so pleased with this announcement, this is one big breaking point for me with upgrading to Wayland/Weston and I'm glad this will be happening before I upgrade.

            Comment


            • #7
              That's primus.

              Comment


              • #8
                Bumblebee vs PRIME, the difference

                Originally posted by DDF420 View Post
                I thought bumblebee/Nvidia optimus switched from one gpu to another where as this appears to be using both at the same time ??
                To understand the difference, we need to understand how each technology works.

                Bumblee is a temporary solution to achieve hybrid graphics using NVIDIA optimus technology. In Bumble, you can turn the discrete NVIDIA card on and off. When the card is turned on, a X server is started to forward the drawing requests to the card. However, remember that the integrated graphics processor is the one actually connected to the framebuffer that is sent to the display - the buffer that the discrete card is drawing to is copied over to the IGP framebuffer using VirtualGL calls.

                PRIME uses dma_buf, which allows the IGP and discrete card to share a file descriptor to the same framebuffer in the IGP, so we don't have to deal with this copying overhead. The discrete card renders to the same buffer as the IGP (i.e. it renders to a piece of RAM instead of GPU memory using DMA). This is IGP/discrete card agnostic, thus it can work with any combination, not just intel/nvidia. Additionally, it allows for reverse OPTIMUS, in which the discrete card's framebuffer (in GPU memory) is sent to the display and the IGP draws to a framebuffer that is then copied to the discrete card's framebuffer. This usually only occurs when the IGP is connected to the laptop monitor, but the extra outputs for connecting a second monitor (VGA, HDMI) are connected only to the discrete card.

                There are probably a few parts that I'm off on, but I think this is the general idea. Here's where I got all my info from:
                Bumblebee, how it works: https://github.com/Bumblebee-Project/Bumblebee/wiki/FAQ
                Bumblebee, history (diff btw PRIME and Bumblebee) https://github.com/Bumblebee-Project...of-the-project
                Reverse OPTIMUS: http://airlied.livejournal.com/76723.html

                Comment


                • #9
                  Originally posted by nslqqq View Post
                  This is support for PRIME, which we have in Xorg since 1.13(september 2012). PRIME should be faster than bumblebee because it utilizes dma_buf kernel feature.
                  No, PRIME is much slower than bumblebee, because with PRIME, the card render on a buffer on RAM (not VRAM) and can't use tiling (since the IGP and the dedicated graphic card don't share the same tiling modes).
                  Moreover dma_buf doesn't support synchronisation, that means you can try to display something that has not been finished drawing, if you don't wait every frame.

                  But since weston can run an embedded session inside any wayland compositor, you can launch a weston session on the dedicated device.
                  Inside the weston session, eveything will run on the dedicating device (with VRAM and tiling).
                  Only 60 times per second, the compositor will use a shared buffer in RAM with no tiling to give the IGP what to display. (there is enough time between every frame, then we don't display things that weren't finished drawing).

                  So PRIME + weston inside a wayland session = native bumblebee. Moreover it doesn't have some issues that has several bumblebee solutions: it benefits from synchronisation (60fps), but we can have a program that runs at more than 60fps.

                  Comment


                  • #10
                    Here are some benchmarks of glmark2 running on Wayland on my dedicated card (hd 7730M) on the two solutions to use the dedicated card I presented in this post:
                    http://phoronix.com/forums/showthrea...049#post358049

                    Running inside a compositor running on the integrated card:

                    Code:
                    =======================================================
                        glmark2 2012.12
                    =======================================================
                        OpenGL Information
                        GL_VENDOR:     X.Org
                        GL_RENDERER:   Gallium 0.4 on AMD CAPE VERDE
                        GL_VERSION:    2.1 Mesa 9.3.0-devel (git-15da955)
                    =======================================================
                    [build] use-vbo=false: FPS: 913 FrameTime: 1.095 ms
                    [build] use-vbo=true: FPS: 985 FrameTime: 1.015 ms
                    [texture] texture-filter=nearest: FPS: 842 FrameTime: 1.188 ms
                    [texture] texture-filter=linear: FPS: 843 FrameTime: 1.186 ms
                    [texture] texture-filter=mipmap: FPS: 843 FrameTime: 1.186 ms
                    [shading] shading=gouraud: FPS: 821 FrameTime: 1.218 ms
                    [shading] shading=blinn-phong-inf: FPS: 822 FrameTime: 1.217 ms
                    [shading] shading=phong: FPS: 822 FrameTime: 1.217 ms
                    [bump] bump-render=high-poly: FPS: 829 FrameTime: 1.206 ms
                    [bump] bump-render=normals: FPS: 953 FrameTime: 1.049 ms
                    [bump] bump-render=height: FPS: 954 FrameTime: 1.048 ms
                    [effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 567 FrameTime: 1.764 ms
                    [effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 567 FrameTime: 1.764 ms
                    [pulsar] light=false:quads=5:texture=false: FPS: 507 FrameTime: 1.972 ms
                    [desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 359 FrameTime: 2.786 ms
                    [desktop] effect=shadow:windows=4: FPS: 431 FrameTime: 2.320 ms
                    [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 357 FrameTime: 2.801 ms
                    [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 359 FrameTime: 2.786 ms
                    [buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 373 FrameTime: 2.681 ms
                    [ideas] speed=duration: FPS: 346 FrameTime: 2.890 ms
                    [jellyfish] <default>: FPS: 261 FrameTime: 3.831 ms
                    [terrain] <default>: FPS: 139 FrameTime: 7.194 ms
                    [shadow] <default>: FPS: 518 FrameTime: 1.931 ms
                    [refract] <default>: FPS: 232 FrameTime: 4.310 ms
                    [conditionals] fragment-steps=0:vertex-steps=0: FPS: 729 FrameTime: 1.372 ms
                    [conditionals] fragment-steps=5:vertex-steps=0: FPS: 713 FrameTime: 1.403 ms
                    [conditionals] fragment-steps=0:vertex-steps=5: FPS: 729 FrameTime: 1.372 ms
                    [function] fragment-complexity=low:fragment-steps=5: FPS: 729 FrameTime: 1.372 ms
                    [function] fragment-complexity=medium:fragment-steps=5: FPS: 729 FrameTime: 1.372 ms
                    [loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 729 FrameTime: 1.372 ms
                    [loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 728 FrameTime: 1.374 ms
                    [loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 727 FrameTime: 1.376 ms
                    =======================================================
                                                      glmark2 Score: 639 
                    =======================================================
                    Running inside a compositor running on the dedicated card:

                    Code:
                    =======================================================
                        glmark2 2012.12
                    =======================================================
                        OpenGL Information
                        GL_VENDOR:     X.Org
                        GL_RENDERER:   Gallium 0.4 on AMD CAPE VERDE
                        GL_VERSION:    2.1 Mesa 9.3.0-devel (git-15da955)
                    =======================================================
                    [build] use-vbo=false: FPS: 2514 FrameTime: 0.398 ms
                    [build] use-vbo=true: FPS: 3544 FrameTime: 0.282 ms
                    [texture] texture-filter=nearest: FPS: 2681 FrameTime: 0.373 ms
                    [texture] texture-filter=linear: FPS: 2674 FrameTime: 0.374 ms
                    [texture] texture-filter=mipmap: FPS: 2813 FrameTime: 0.355 ms
                    [shading] shading=gouraud: FPS: 2666 FrameTime: 0.375 ms
                    [shading] shading=blinn-phong-inf: FPS: 2668 FrameTime: 0.375 ms
                    [shading] shading=phong: FPS: 2591 FrameTime: 0.386 ms
                    [bump] bump-render=high-poly: FPS: 1773 FrameTime: 0.564 ms
                    [bump] bump-render=normals: FPS: 3436 FrameTime: 0.291 ms
                    [bump] bump-render=height: FPS: 3398 FrameTime: 0.294 ms
                    [effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 1798 FrameTime: 0.556 ms
                    [effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 1209 FrameTime: 0.827 ms
                    [pulsar] light=false:quads=5:texture=false: FPS: 2061 FrameTime: 0.485 ms
                    [desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 671 FrameTime: 1.490 ms
                    [desktop] effect=shadow:windows=4: FPS: 974 FrameTime: 1.027 ms
                    [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 620 FrameTime: 1.613 ms
                    [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 613 FrameTime: 1.631 ms
                    [buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 662 FrameTime: 1.511 ms
                    [ideas] speed=duration: FPS: 665 FrameTime: 1.504 ms
                    [jellyfish] <default>: FPS: 1539 FrameTime: 0.650 ms
                    [terrain] <default>: FPS: 173 FrameTime: 5.780 ms
                    [shadow] <default>: FPS: 940 FrameTime: 1.064 ms
                    [refract] <default>: FPS: 253 FrameTime: 3.953 ms
                    [conditionals] fragment-steps=0:vertex-steps=0: FPS: 2686 FrameTime: 0.372 ms
                    [conditionals] fragment-steps=5:vertex-steps=0: FPS: 2686 FrameTime: 0.372 ms
                    [conditionals] fragment-steps=0:vertex-steps=5: FPS: 2682 FrameTime: 0.373 ms
                    [function] fragment-complexity=low:fragment-steps=5: FPS: 2687 FrameTime: 0.372 ms
                    [function] fragment-complexity=medium:fragment-steps=5: FPS: 2686 FrameTime: 0.372 ms
                    [loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 2685 FrameTime: 0.372 ms
                    [loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 2686 FrameTime: 0.372 ms
                    [loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 2678 FrameTime: 0.373 ms
                    =======================================================
                                                      glmark2 Score: 2012 
                    =======================================================

                    I'm not sure of the profile mode of the card (but it is not DPM. kernel 3.8)

                    Comment

                    Working...
                    X