Announcement

Collapse
No announcement yet.

New XWayland API Proposed For Better Performance

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

  • New XWayland API Proposed For Better Performance

    Phoronix: New XWayland API Proposed For Better Performance

    A new XWayland API has been proposed for helping the X.Org drivers implement the ScheduleSwap event and for providing an efficient implementation of async swaps. The new interfaces for XWayland can avoid copies and thus provide real-world performance improvements...

    http://www.phoronix.com/vr.php?view=MTQ4ODA

  • #2
    An important thing to note is that initially, AsyncSwap was proposed by Chris Wilson,
    and he has done an implementation for the intel DDX. If a patch enabling AsyncSwap
    is merged, XWayland won't be the only one to benefit from increased of performance
    and removal of tearings.

    Comment


    • #3
      lol XWayland will be able to run X programs better than X

      Comment


      • #4
        This is also only useful for full screen applications, which should hopefully be fairly rare under XWayland.

        Comment


        • #5
          hmm, xorg server 1.15 merge window closes in two weeks, is this ready enough to be merged right away? Would it keep Xwayland from being merged until the next version? Is Xwayland ready to be merged in the first place?

          Comment


          • #6
            Really?

            Originally posted by smitty3268 View Post
            This is also only useful for full screen applications, which should hopefully be fairly rare under XWayland.
            Almost all TV apps and many new games (Steam prods incl.) are used in full screen mode. I can't agree with your point there...

            Comment


            • #7
              Originally posted by smitty3268 View Post
              This is also only useful for full screen applications, which should hopefully be fairly rare under XWayland.
              You said it, hopefully. But IRL, games will not be necessarily supported, to give an example, at least not right away. And I don't know about you, but I like playing them full screen.

              I think I know what you meant, though. Was it an allusion to running a desktop over a compatibility layer?

              Comment


              • #8
                Originally posted by smitty3268 View Post
                This is also only useful for full screen applications, which should hopefully be fairly rare under XWayland.
                Uh, people don't watch full-screen video much?

                Comment


                • #9
                  So ... did I miss something? Applications that draw into thier own buffer are essentially equivalent to fullscreen as far as wayland cares right?

                  Comment


                  • #10
                    Originally posted by cb88 View Post
                    So ... did I miss something? Applications that draw into thier own buffer are essentially equivalent to fullscreen as far as wayland cares right?
                    On X, Dri2 Applications render into a back buffer.

                    The front buffer is what we see from the application.

                    If the application has added decorations to the window, the front buffer has a different size than the back-buffer. You can't optimize in this case: you have to do a copy from the back-buffer to the front-buffer.
                    If the front-buffer was being drawn on your monitor during the copy, you may get tearings.

                    When you have a fullscreen application, you have no added decoration, then you can avoid the copy if the front buffer and back buffer are similar, by doing an exchange.

                    Some Window manager handle decorations in some ways, that the front-buffer is the same size of the back-buffer everytime. In that case we can optimize as in fullscreen mode.


                    For Wayland, the model is different, and you can always avoid the copy for applications using the GPU. XWayland has to do as X, but lives in a Wayland world.

                    Comment


                    • #11
                      Yea, in XWayland, every application is rootless, so every application is always running in fullscreen as far as X is concerned. So this should help everything, if I'm not mistaken.

                      Comment


                      • #12
                        Originally posted by TheBlackCat View Post
                        Uh, people don't watch full-screen video much?
                        I don't think that case should be considered, since most popular media players should get ported natively.

                        Comment


                        • #13
                          Originally posted by GreatEmerald View Post
                          Yea, in XWayland, every application is rootless, so every application is always running in fullscreen as far as X is concerned. So this should help everything, if I'm not mistaken.
                          ^THIS^

                          I'm still waiting on XWayland composite bypass for "fullscreen applications", which because of ^THIS^ means every application :P
                          Then XWayland will at least be as-fast if not sometimes faster than native X...

                          Comment


                          • #14
                            Here are the complete benchmarks:


                            The benchmarks are done with glmark2 on an intel hd4000, fullscreen(1920x1080):

                            X, with sna, on Kwin:

                            Code:
                            =======================================================
                                glmark2 2012.12
                            =======================================================
                                OpenGL Information
                                GL_VENDOR:     Intel Open Source Technology Center
                                GL_RENDERER:   Mesa DRI Intel(R) Ivybridge Mobile 
                                GL_VERSION:    3.0 Mesa 9.3.0-devel (git-15da955)
                            =======================================================
                            [build] use-vbo=false: FPS: 434 FrameTime: 2.304 ms (* note: This is noise. Go see next test. The intel card has to wake up*)
                            [build] use-vbo=true: FPS: 625 FrameTime: 1.600 ms
                            [texture] texture-filter=nearest: FPS: 607 FrameTime: 1.647 ms
                            [texture] texture-filter=linear: FPS: 607 FrameTime: 1.647 ms
                            [texture] texture-filter=mipmap: FPS: 600 FrameTime: 1.667 ms
                            [shading] shading=gouraud: FPS: 537 FrameTime: 1.862 ms
                            [shading] shading=blinn-phong-inf: FPS: 539 FrameTime: 1.855 ms
                            [shading] shading=phong: FPS: 539 FrameTime: 1.855 ms
                            [bump] bump-render=high-poly: FPS: 404 FrameTime: 2.475 ms
                            [bump] bump-render=normals: FPS: 596 FrameTime: 1.678 ms
                            [bump] bump-render=height: FPS: 603 FrameTime: 1.658 ms
                            [effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 329 FrameTime: 3.040 ms
                            [effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 173 FrameTime: 5.780 ms
                            [pulsar] light=false:quads=5:texture=false: FPS: 505 FrameTime: 1.980 ms
                            [desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 165 FrameTime: 6.061 ms
                            [desktop] effect=shadow:windows=4: FPS: 276 FrameTime: 3.623 ms
                            [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 395 FrameTime: 2.532 ms
                            [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 389 FrameTime: 2.571 ms
                            [buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 409 FrameTime: 2.445 ms
                            [ideas] speed=duration: FPS: 470 FrameTime: 2.128 ms
                            [jellyfish] <default>: FPS: 316 FrameTime: 3.165 ms
                            [terrain] <default>: FPS: 49 FrameTime: 20.408 ms
                            [shadow] <default>: FPS: 178 FrameTime: 5.618 ms
                            [refract] <default>: FPS: 67 FrameTime: 14.925 ms
                            [conditionals] fragment-steps=0:vertex-steps=0: FPS: 523 FrameTime: 1.912 ms
                            [conditionals] fragment-steps=5:vertex-steps=0: FPS: 529 FrameTime: 1.890 ms
                            [conditionals] fragment-steps=0:vertex-steps=5: FPS: 524 FrameTime: 1.908 ms
                            [function] fragment-complexity=low:fragment-steps=5: FPS: 525 FrameTime: 1.905 ms
                            [function] fragment-complexity=medium:fragment-steps=5: FPS: 528 FrameTime: 1.894 ms
                            [loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 525 FrameTime: 1.905 ms
                            [loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 524 FrameTime: 1.908 ms
                            [loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 529 FrameTime: 1.890 ms
                            =======================================================
                                                              glmark2 Score: 438 
                            =======================================================
                            Under XWayland, with wlglamor, without AsyncSwap support:
                            Code:
                            =======================================================
                                glmark2 2012.12
                            =======================================================
                                OpenGL Information
                                GL_VENDOR:     Intel Open Source Technology Center
                                GL_RENDERER:   Mesa DRI Intel(R) Ivybridge Mobile 
                                GL_VERSION:    3.0 Mesa 9.3.0-devel (git-15da955)
                            =======================================================
                            [build] use-vbo=false: FPS: 538 FrameTime: 1.859 ms
                            [build] use-vbo=true: FPS: 556 FrameTime: 1.799 ms
                            [texture] texture-filter=nearest: FPS: 559 FrameTime: 1.789 ms
                            [texture] texture-filter=linear: FPS: 562 FrameTime: 1.779 ms
                            [texture] texture-filter=mipmap: FPS: 547 FrameTime: 1.828 ms
                            [shading] shading=gouraud: FPS: 488 FrameTime: 2.049 ms
                            [shading] shading=blinn-phong-inf: FPS: 484 FrameTime: 2.066 ms
                            [shading] shading=phong: FPS: 489 FrameTime: 2.045 ms
                            [bump] bump-render=high-poly: FPS: 382 FrameTime: 2.618 ms
                            [bump] bump-render=normals: FPS: 570 FrameTime: 1.754 ms
                            [bump] bump-render=height: FPS: 543 FrameTime: 1.842 ms
                            [effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 322 FrameTime: 3.106 ms
                            [effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 173 FrameTime: 5.780 ms
                            [pulsar] light=false:quads=5:texture=false: FPS: 458 FrameTime: 2.183 ms
                            [desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 166 FrameTime: 6.024 ms
                            [desktop] effect=shadow:windows=4: FPS: 271 FrameTime: 3.690 ms
                            [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 339 FrameTime: 2.950 ms
                            [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 352 FrameTime: 2.841 ms
                            [buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 368 FrameTime: 2.717 ms
                            [ideas] speed=duration: FPS: 397 FrameTime: 2.519 ms
                            [jellyfish] <default>: FPS: 302 FrameTime: 3.311 ms
                            [terrain] <default>: FPS: 49 FrameTime: 20.408 ms
                            [shadow] <default>: FPS: 180 FrameTime: 5.556 ms
                            [refract] <default>: FPS: 68 FrameTime: 14.706 ms
                            [conditionals] fragment-steps=0:vertex-steps=0: FPS: 487 FrameTime: 2.053 ms
                            [conditionals] fragment-steps=5:vertex-steps=0: FPS: 496 FrameTime: 2.016 ms
                            [conditionals] fragment-steps=0:vertex-steps=5: FPS: 482 FrameTime: 2.075 ms
                            [function] fragment-complexity=low:fragment-steps=5: FPS: 488 FrameTime: 2.049 ms
                            [function] fragment-complexity=medium:fragment-steps=5: FPS: 492 FrameTime: 2.033 ms
                            [loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 481 FrameTime: 2.079 ms
                            [loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 489 FrameTime: 2.045 ms
                            [loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 492 FrameTime: 2.033 ms
                            =======================================================
                                                              glmark2 Score: 408 
                            =======================================================
                            sna seems to do copies faster than glamor, which explains the better performance with sna.

                            Under XWayland, with new Api, new wlglamor, AsyncSwap enabled in X:
                            Code:
                            =======================================================
                                glmark2 2012.12
                            =======================================================
                                OpenGL Information
                                GL_VENDOR:     Intel Open Source Technology Center
                                GL_RENDERER:   Mesa DRI Intel(R) Ivybridge Mobile 
                                GL_VERSION:    3.0 Mesa 9.3.0-devel (git-15da955)
                            =======================================================
                            [build] use-vbo=false: FPS: 1331 FrameTime: 0.751 ms
                            [build] use-vbo=true: FPS: 1504 FrameTime: 0.665 ms
                            [texture] texture-filter=nearest: FPS: 1821 FrameTime: 0.549 ms
                            [texture] texture-filter=linear: FPS: 1845 FrameTime: 0.542 ms
                            [texture] texture-filter=mipmap: FPS: 1811 FrameTime: 0.552 ms
                            [shading] shading=gouraud: FPS: 976 FrameTime: 1.025 ms
                            [shading] shading=blinn-phong-inf: FPS: 983 FrameTime: 1.017 ms
                            [shading] shading=phong: FPS: 993 FrameTime: 1.007 ms
                            [bump] bump-render=high-poly: FPS: 725 FrameTime: 1.379 ms
                            [bump] bump-render=normals: FPS: 1887 FrameTime: 0.530 ms
                            [bump] bump-render=height: FPS: 1708 FrameTime: 0.585 ms
                            [effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 537 FrameTime: 1.862 ms
                            [effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 228 FrameTime: 4.386 ms
                            [pulsar] light=false:quads=5:texture=false: FPS: 1175 FrameTime: 0.851 ms
                            [desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 212 FrameTime: 4.717 ms
                            [desktop] effect=shadow:windows=4: FPS: 394 FrameTime: 2.538 ms
                            [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 361 FrameTime: 2.770 ms
                            [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 362 FrameTime: 2.762 ms
                            [buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 392 FrameTime: 2.551 ms
                            [ideas] speed=duration: FPS: 645 FrameTime: 1.550 ms
                            [jellyfish] <default>: FPS: 323 FrameTime: 3.096 ms
                            [terrain] <default>: FPS: 53 FrameTime: 18.868 ms
                            [shadow] <default>: FPS: 233 FrameTime: 4.292 ms
                            [refract] <default>: FPS: 74 FrameTime: 13.514 ms
                            [conditionals] fragment-steps=0:vertex-steps=0: FPS: 824 FrameTime: 1.214 ms
                            [conditionals] fragment-steps=5:vertex-steps=0: FPS: 900 FrameTime: 1.111 ms
                            [conditionals] fragment-steps=0:vertex-steps=5: FPS: 826 FrameTime: 1.211 ms
                            [function] fragment-complexity=low:fragment-steps=5: FPS: 834 FrameTime: 1.199 ms
                            [function] fragment-complexity=medium:fragment-steps=5: FPS: 853 FrameTime: 1.172 ms
                            [loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 833 FrameTime: 1.200 ms
                            [loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 830 FrameTime: 1.205 ms
                            [loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 877 FrameTime: 1.140 ms
                            =======================================================
                                                              glmark2 Score: 854 
                            =======================================================
                            Please note again that if AsyncSwap was enabled in X, every DDX implementing it would benefit from it.
                            The intel DDX has already an implementation of AsyncSwap ready, but I haven't tested it.

                            The interesting numbers are for low fps, since they represent better what we get with games.-> don't expect a 2X performance improvement!
                            Last edited by mannerov; 10-17-2013, 03:03 PM.

                            Comment


                            • #15
                              Originally posted by Daktyl198 View Post
                              ^THIS^

                              I'm still waiting on XWayland composite bypass for "fullscreen applications", which because of ^THIS^ means every application :P
                              Then XWayland will at least be as-fast if not sometimes faster than native X...
                              I guess Mir one ups XWayland on that one!

                              Comment

                              Working...
                              X