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

QOpenGLContext::makeCurrent always calls [NSOpenGLContextupdate] which has major impact on performances

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.12
    • 5.8.0, 5.9.1
    • QPA
    • None
    • Mac OSX 10.10, 10.11, 10.12
    • macOS

      Each call to QOpenGLContext::makeCurrent calls NSOpenGLContext::update which impacts performances a lot in my case.

      This "update" call is necessary when the Window surface geometry changed or when display mode changed. It would be good to avoid this call when not required.

      I have 7 OpenGL widgets, at 60 FPS, that's 7*60 calls per second.
      In Instruments I can see the application spends 10% time in this call and 0.2% in NSOpenGLContext::makeCurrentContext:

      188.00 ms   11.2%    1.00 ms                                   QOpenGLContext::makeCurrent(QSurface*)
      184.00 ms   10.9%    0 s                                    0x11db03470
      173.00 ms   10.3%    0 s                                     -[NSOpenGLContext update]
      5.00 ms    0.2%    0 s                                     -[NSOpenGLContext makeCurrentContext]

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

            vestbo Tor Arne Vestbø
            mabeghin Matthieu B.
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes