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

QOffscreenContext becomes version 2.0 when using EGL

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P3: Somewhat important
    • None
    • 5.11.3
    • GUI: OpenGL
    • None
    • Linux/X11

    Description

      Hi,

      I have an application that creates a window with some OpenGL contexts, and then a bunch of offscreen surfaces and contexts (sharing with the former) to be able to hand them to worker threads.

      I ask for OpenGL 4.5 core, same as for the global context:

       QSurfaceFormat fmt;
       fmt.setDepthBufferSize(0);
       fmt.setStencilBufferSize(0);
       fmt.setProfile(QSurfaceFormat::CoreProfile);
       fmt.setMajorVersion(4);
       fmt.setMinorVersion(5);
       fmt.setSwapInterval(0);
       assert(QThread::currentThread() == QCoreApplication::instance()->thread());
       QOffscreenSurface *surface = new QOffscreenSurface;
       surface->setFormat(fmt);
       surface->create();

      However, if I use EGL (QT_XCB_GL_INTEGRATION=xcb_egl), which I need to for some zerocopy functionality between OpenGL and VA-API, the offscreen surfaces come back as 2.0 compatibility, instead of 4.5 core. So now you have a 4.5 core and a 2.0 compatibility context, sharing shaders. This triggers Mesa bug #110872 (which I guess you could argue isn't a Mesa bug at all), which makes my application crash.

      Attachments

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

        Activity

          People

            lagocs Laszlo Agocs
            Sesse Steinar H. Gunderson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes