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

macOS: QtWebEngine hardware acceleration is always disabled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 5.15.1
    • 5.13.0, 5.13.1, 5.13.2, 5.14.0, 5.14.1
    • GUI: OpenGL, WebEngine
    • None
    •  MacBook Pro 15" 2019 with macOS Catalina 10.15.2 GPU: Radeon Pro 560X
      Using Qt prebuilt frameworks
    • macOS
    • daf822dc41ce7c8acb7225cf17bbb269d6cc77ee

    Description

      When running a qwebengineview on macOS, the hardware acceleration is always disabled.

      Steps to reproduce:

      1. Run simplebrowser example.
      2. Enter in the url "chrome://gpu"

      Expected:

      Since I'm running a machine which should be OpenGL 4.1 capable (https://support.apple.com/en-us/HT202823) I would expect the hardware acceleration to be turned on.

      Result:

      It appears to as turned off with this message: "Disallow use of OpenGL on Mac with core profile < 4.1"

      Environment:

      • OS: macOS Catalina 10.15.2
      • Machine: MacBook Pro 15" 2019
      • GPU: Radeon Pro 560X
      • Using Qt prebuilt frameworks

      Notes:

      If I use Qt 5.10.1 the hardware acceleration is enabled, but it says that webgl2 is disable, as it also reports OpenGL 2.1. My feeling is that newer versions of chromium have set up a more strict restriction to disallow all of OpenGL on any version less than 4.1.

      After some research my feeling is that for some reason Qt is reporting the OpenGL version on macOS incorrectly. It is always reporting 2.1, but it should be 4.1 on most of the newer systems (I think all macOS 10.10 capable are already 4.1 but don't remember where I read that).

      See also this github commit which forces the context to use 4.1 version. It is not mine, but it also fixes it on my app:
      https://github.com/mosra/magnum-bootstrap/commit/67ee39251afa88a307923ad2f18d0445ea67fa34

      Also it seems that disabling the blacklisted gpu via a command line parameter (--ignore-gpu-blacklist) makes it to enable the hardware acceleration. But this is risky, as the might be other situations where it actually should be disabled (like for older nvidia gpus)

      Attachments

        Issue Links

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

          Activity

            People

              mibrunin Michael Bruning
              sinspiral Alberto Fdez
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes