Announcement

Collapse
No announcement yet.

Mesa 20.3 Picks Up New Capabilities To Help With Display Presentation Jitter, Stuttering

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

  • Mesa 20.3 Picks Up New Capabilities To Help With Display Presentation Jitter, Stuttering

    Phoronix: Mesa 20.3 Picks Up New Capabilities To Help With Display Presentation Jitter, Stuttering

    Being merged today to Mesa 20.3-devel were some improvements aiming to help with display presentation jitter and hopefully avoid stuttering in the frame-rate...

    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
    Are you talking about this?

    ​​​​​​

    Comment


    • #3
      For the uninitiated, here's a nice explanation of the feature (told from the Vulkan perspective, but it's a good writeup and will get you knowing what both are).

      It should help with applications that are rendering slower than the native display refresh rate. They may stutter less, but it could introduce some tearing, as the image will be submitted immediately instead of on the next vblank.

      https://vulkan-tutorial.com/Drawing_...sentation-mode

      Comment


      • #4
        I honestly don't think anybody but me cared about these extensions, so kudos to Adam Jackson for doing this so quickly.

        Comment


        • #5
          Originally posted by mcoffin View Post
          For the uninitiated, here's a nice explanation of the feature (told from the Vulkan perspective, but it's a good writeup and will get you knowing what both are).

          It should help with applications that are rendering slower than the native display refresh rate. They may stutter less, but it could introduce some tearing, as the image will be submitted immediately instead of on the next vblank.

          https://vulkan-tutorial.com/Drawing_...sentation-mode
          Is this effectively "Adaptive V-Sync" as it was commonly called a few years ago?

          Comment


          • #6
            Originally posted by Calinou View Post

            Is this effectively "Adaptive V-Sync" as it was commonly called a few years ago?
            Wasn't Adaptive V-Sync implemented in Mesa for years already? (but more like forced adaptive VSync... like no way to turn it off and block on SwapBuffers)

            Comment


            • #7
              Since these are extensions, they have to be actively used by applications or game engines before we have any benefit...

              Comment


              • #8
                Originally posted by tildearrow View Post
                Wasn't Adaptive V-Sync implemented in Mesa for years already? (but more like forced adaptive VSync... like no way to turn it off and block on SwapBuffers)
                Definitely not. Mesa used to hard-sync on SwapBuffers, which was exactly the opposite of that. The nvidia drivers do automatic triple-buffering that doesn't allow SwapBuffers to block until there's 1 frame of lag, but you can turn that off now, and that's not quite the same thing.

                Originally posted by ernstp View Post
                Since these are extensions, they have to be actively used by applications or game engines before we have any benefit...
                Nvidia drivers already supported them, so there's probably stuff out there using them already. I wanted fifo-relaxed for personal development reasons, though.

                Comment


                • #9
                  Originally posted by ernstp View Post
                  Since these are extensions, they have to be actively used by applications or game engines before we have any benefit...
                  If anyone wanted to, they could add something to the drivers to allow forcing different modes. Or add it as a drirc option per executable.

                  Comment


                  • #10
                    Originally posted by Calinou View Post

                    Is this effectively "Adaptive V-Sync" as it was commonly called a few years ago?
                    No. Adaptive sync is different (allowing monitors with FreeSync capability to "adapt" their refresh rate to try and line up with about what a renderer is outputting). These extensions simply deal with how applications with vsync enabled deal with the situation where, for whatever reason, the application is late to deliver a frame. Previously, the "late" frame would have to just wait until the next vblank, which means stuttering. With these extensions in use, the "late" frame will be displayed IMMEDIATELY, potentially causing some screen tearing, but significantly reducing the stuttering that would be seen in the other case. If you then decide that you can't stand the tearing either, then you'll want to use VK_PRESENT_MODE_MAILBOX_KHR, implementing triple buffering. The downside to this approach is potentially introduced input lag. In this approach, there's three images, an always-complete image that the display will display next, an always-complete image that will be pushed to the first image once it's displayed, and a final image that the application keeps replacing with it's newest frame. This way, images are always displayed on vblank, with no tearing, but there will potentially be an extra frame from when the application queued the frame, until the frame is in the first buffer, and is the one being displayed (introducing an extra frame of latency). This matters less on high-refresh rates, as the single-frame of lag is less time overall, but can be annoying for highly-latency-sensitive things, and especially in low refresh rate deployments.

                    The place these new extensions will likely help the most, in my experience, is running games with a compositor running. Right now, despite sway being far and away my favorite gaming Wayland compositor, it would be completely un-livable without the current adaptive sync support. With this change, I'd expect to see much more livable performance, albeit with some tearing, even when I turn off adaptive sync (which sway's support for is awesome, and supports multi-monitor FreeSync, and I have a keybind to just toggle it when I please. Seriously if you use FreeSync, sway's implementation is super well-done and user friendly compared to ANYTHING I've seen on Xorg).

                    Sorry for the rambling reply, I was up too late last night.

                    EDIT: Actually, looks like the merge request only supports the extensions on X11. Bummer.
                    Last edited by mcoffin; 12 September 2020, 03:10 PM.

                    Comment

                    Working...
                    X