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

GLX extensions should be checked for on both server and client

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.6.1
    • 3.x
    • GUI: OpenGL
    • None
    • 8f3ba6ac205e5faed7260abb60463375ab4a2f74

    Description

      The code in src/opengl/qgl_x11.cpp checks in various places for GLX extensions. Apart from the GLX_ARB_get_proc_address extension, all of the extensions checked for need to be present in both the GLX client library and the GLX server. However, only the client extension string is ever checked against, causing the OpenGL code to fail if the server GLX version is lower than the client GLX version. This is not an uncommon situation since the client library typically supports the union of all server features.

      For instance, it breaks down with Intel graphics hardware on Ubuntu Linux (karmic).

      The second attached patch goes on top of the first one and fixes the overly simplistic and therefore incorrect parsing of the extension string. To clean things up a bit, I introduced a new local utility function for scanning the extensions string, using a piece of tested code from a project of mine, slightly adapted to the Qt coding style conventions.

      Note that even with these changes, I think the code is still wrong because it assumes that GLX extensions will be static for the entire lifetime of the process. As far as I'm aware the function pointers returned by glXGetProcAddress() are guaranteed to be context-independent (unlike WGL). However, the list of extensions could change, or could even be different between screens.

      The patches apply to the 4.6 branch of Qt at <http://qt.gitorious.org/qt/qt>.

      Attachments

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

        Activity

          People

            kjernase Trond Kjernåsen (Inactive)
            danielk Daniel Elstner
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes