Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-98254

Use partial texture uploads for shm buffers

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15, 6.2
    • Wayland Compositor
    • None

    Description

      Raster-based Wayland clients running against a QtWayland compositor will normally reuse the same buffer, but SharedMemoryBuffer::toOpenGlTexture() will always re-upload the whole buffer using glTexImage2D(), even if only a small part of the buffer has been damaged.

      In order to improve performance, we should use glTexSubImage2D() to update only the part of the texture that has been changed. Uploading a rectangular region of a raster image is done by setting the stride with glPixelStorei(GL_PACK_ROW_LENGTH, stride). Note that this is not available in GLES 2, where we would have to upload a sub-image that has the full width of the buffer.

      This will also require some book-keeping to keep track of the dirty region.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.graphics.and.multimedia Qt Graphics Team
            tvete Paul Olav Tvete
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes