UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Heads up: proposed Mir platform changes

    Scheduled Pinned Locked Moved Lomiri (was Unity8)
    2 Posts 1 Posters 624 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • R Offline
        RAOF
        last edited by

        As a part of getting the NVIDIA binary platform up to a fully-supported state (and, in particular, supporting EGL clients) I'm proposing some changes to the core interfaces Mir provides from the platform.

        Specifically, the interface that client buffers provide the renderer will change from gl::TextureSource (a thing that can be uploaded into a GL texture) to gl::Texture (a thing that is a GL texture, and provides a shader that will render said texture).

        This is of interest to Unity8 developers in two ways:

        • It changes the interfaces that the android platform has to provide to the rest of Mir, and
        • It changes the interface that QtMir's renderer uses to extract the content of client buffers for rendering in the Qt scene.

        I don't believe that these changes will be difficult for either end to adapt to, but please check out the merge proposal and feel free to give feedback if this new interface is difficult for either end of UBports.

        1 Reply Last reply Reply Quote 3
        • R Offline
          RAOF
          last edited by

          So, I've had a chat with Gerry Boland (former primary developer of QtMir) and while this is not entirely straightforward to adapt QtMir to it does look feasible.

          The relevant changes would be in MirSurfaceItem. Excerpts of the relevant IRC log:

          to provide shaders, need to implement QSGMaterial somehow - https://doc.qt.io/qt-5/qsgsimplematerialshader.html
          and then use it in https://doc.qt.io/qt-5/qsggeometrynode.html#setMaterial
          https://codereview.qt-project.org/#/c/70577/7/lib/yuv_video_node.cpp looks vaguely appropriate.
          YUVAVideoMaterial is an implementation of QSGMaterial, whose createShader() implementation returns that handy QSGMaterialShader
          I think that's a good template to follow
          QtMir would need to have a QSGMaterial that also derived from mir::graphics::gl::Program, and took the necessary shader fragments and smushed them into the shader source it returns.
          Provide that as the mir::graphics::gl::ProgramFactory and then the Texture will supply you with the appropriate QSGMaterial

          1 Reply Last reply Reply Quote 1
          • First post
            Last post