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

Investigate enabling threaded GL for MESA

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.9.4, 5.10.1, 5.11.0 Beta 2
    • QPA: X11/XCB
    • None
    • Desktop Linux with Open Source graphics (MESA and X11/XCB)

    Description

      Back in the days of Qt 5.3 there used to be bug in `libxcb` that would caused crashes with threaded GL on XCB with MESA. The fix for that bug was released in 2014 and ships any modern Linux distribution at this point.

      In order to have a focused discussion on this I'm gonna quote the entire original rationale for the blacklist entry here (from `qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp:623`):

      // This disables threaded rendering on anything using mesa, e.g.
      // - nvidia/nouveau
      // - amd/gallium
      // - intel
      // - some software opengl implementations
      //
      // The client glx vendor string is used to identify those setups as that seems to show the least
      // variance between the bad configurations. It's always "Mesa Project and SGI". There are some
      // configurations which don't use mesa and which can do threaded rendering (amd and nvidia chips
      // with their own proprietary drivers).
      //
      // This, of course, is very broad and disables threaded rendering on a lot of devices which would
      // be able to use it. However, the bugs listed below don't follow any easily recognizable pattern
      // and we should rather be safe.
      //
      // http://cgit.freedesktop.org/xcb/libxcb/commit/?id=be0fe56c3bcad5124dcc6c47a2fad01acd16f71a will
      // fix some of the issues. Basically, the proprietary drivers seem to have a way of working around
      // a fundamental flaw with multithreaded access to xcb, but mesa doesn't. The blacklist should be
      // reevaluated once that patch is released in some version of xcb.
      static const char *qglx_threadedgl_blacklist_vendor[] = {
          "Mesa Project and SGI",                // QTCREATORBUG-10875 (crash in creator)
                                                 // QTBUG-34492 (flickering in fullscreen)
                                                 // QTBUG-38221
          0
      };
      

      I guess now would be a good time for that mentioned reevalution. If we limit this to the mentioned bug reports this basically boils down to:

      1. `QTBUG-38221` is about the required XCB patched and should be fixed
      2. `QTBUG-34492` does not mention any steps to reproduce but maybe somebody with Intel graphics can run Okular in fullscreen and quickly changing pages or something to "test" whether they see any flickering
      3. `QTCREATORBUG-10875` has to be checked by somebody with NVidia graphics and nouvea drivers

      Each test needs to be done with `QT_OPENGL_NO_SANITY_CHECK=yes` environment variable being set (or the blacklist entry being removed from source code).

      I'm not familiar with Qt's release process but I'm guessing such a change (after testing) would also require a full release cycle, right?

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-67277
          # Subject Branch Project Status CR V

          Activity

            People

              Unassigned Unassigned
              alexander255 Alexander Schlarb
              Veli-Pekka Heinonen Veli-Pekka Heinonen
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes