Announcement

Collapse
No announcement yet.

GNOME 46 Beta Released - Mutter Supporting Direct Scanout For Cropped/Scaled Surfaces

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

  • GNOME 46 Beta Released - Mutter Supporting Direct Scanout For Cropped/Scaled Surfaces

    Phoronix: GNOME 46 Beta Released - Mutter Supporting Direct Scanout For Cropped/Scaled Surfaces

    The GNOME 46 beta is out today for featuring the latest fixes and last-minute enhancements to this open-source desktop environment update due out in March...

    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
    In case people wonder: the main use case for scaling/cropping via hardware planes is zero-copy video playback, so the display controller can import YCbCr buffers (formats like NV12) directly from from the decoder (e.g. VA-API, passed from the app to the Wayland compositor) and display them on screen very efficiently. For laptops etc. doing so can easily reduce power consumption by more than half if video playback is the main running task.

    That's one of the things that X11 was not well suited for, which is why we don't see it much in the Linux desktop world yet - while Windows, MacOS, iOS, Android, even ChromeOS have been supporting it for quite some time.
    So this is something that allows Wayland desktops to catch up to other modern OSs. For gaming it's mostly a nice to have, which may have a noticeable impact on low-end hardware.
    .
    P.S. some Linux apps like Kodi AFAIK support this already when run standalone without windowing system - but they need to use kernel/KMS APIs directly.
    Last edited by treba; 17 February 2024, 07:11 PM.

    Comment


    • #3
      Originally posted by treba View Post
      For gaming it's mostly a nice to have, which may have a noticeable impact on low-end hardware.
      One of the reasons it's nice to have is because it allows games to be scaled with the GPUs hardware/driver scaler when running at below the display's resolution. With X11 you'd have to change the display resolution to do this.

      I know there's one particular member of this forums that would love this. I just told them about it a week or two ago.

      Comment


      • #4
        Originally posted by treba View Post
        In case people wonder: ....
        Thank you for the explanation

        Comment


        • #5
          Originally posted by treba View Post
          In case people wonder: the main use case for scaling/cropping via hardware planes is zero-copy video playback, so the display controller can import YCbCr buffers (formats like NV12) directly from from the decoder (e.g. VA-API, passed from the app to the Wayland compositor) and display them on screen very efficiently. For laptops etc. doing so can easily reduce power consumption by more than half if video playback is the main running task.

          That's one of the things that X11 was not well suited for, which is why we don't see it much in the Linux desktop world yet - while Windows, MacOS, iOS, Android, even ChromeOS have been supporting it for quite some time.
          So this is something that allows Wayland desktops to catch up to other modern OSs. For gaming it's mostly a nice to have, which may have a noticeable impact on low-end hardware.
          .
          P.S. some Linux apps like Kodi AFAIK support this already when run standalone without windowing system - but they need to use kernel/KMS APIs directly.
          Don't worry, sure someone will come here with no idea about how Xorg and modern graphics hardware works and claim this could of been done on X instead.

          Comment


          • #6
            Is this the first Wayland server implementation that others could use as an example? Indeed, glad to see Linux is catching up with other modern desktops now that X11 is out of the way.

            Comment


            • #7
              Originally posted by mrg666 View Post
              Is this the first Wayland server implementation that others could use as an example? Indeed, glad to see Linux is catching up with other modern desktops now that X11 is out of the way.
              Full screen direct scanout was supported by KDEs KWin since 2021. No idea about cropped/scaled scanout, it might not be supported yet.

              Comment


              • #8
                Originally posted by fallingcats View Post

                Full screen direct scanout was supported by KDEs KWin since 2021. No idea about cropped/scaled scanout, it might not be supported yet.
                Looks like it's supported direct scanout of scaled (not sure about cropped because I didn't read the code) surfaces for about a year now.

                The main use cases are fractional scaling and video players that leave scaling the video up to the compositor Tested with Xonotic + X11 apps scaled...

                Comment


                • #9
                  Originally posted by Myownfriend View Post

                  Looks like it's supported direct scanout of scaled (not sure about cropped because I didn't read the code) surfaces for about a year now.

                  https://invent.kde.org/plasma/kwin/-..._requests/3375
                  Looks like the MR does not implement cropping, but that's not as common as scaling. IIUC KWin will also support NV12 in the upcoming release - that's great news as it means both Gnome and KDE should support zero-copy video playback for some common cases, making it way more attractive for app/toolkit developers to do so as well.

                  The upcoming version of GTK (4.14) will support it in combination with Gstreamer 1.24 (also about to be released). If things work out well, I hope there will be much broader adoption soon.

                  Comment

                  Working...
                  X