[Qtwebengine] QtWebEngine + WebGL + ANGLE + Intel + Windows?

Alexandru Croitor alexandru.croitor at qt.io
Mon Aug 21 10:45:15 CEST 2017


Hello,

On 21. Aug 2017, at 10:29, Matt via QtWebEngine <qtwebengine at qt-project.org<mailto:qtwebengine at qt-project.org>> wrote:

Hello, this is regarding the following forum post:

Qt5: can WebGL work with ANGLE on Windows via QtWebEngine?<https://forum.qt.io/topic/82530/qt5-can-webgl-work-with-angle-on-windows-via-qtwebengine>

where it was suggested that we send a message to this mailing list for more authoritative answers.

tl;dr: We're not able to get WebGL pages viewed with QtWebEngine (5.9.1 or 5.10.0) working on a Windows 10 Surface Pro 3, which uses Intel HD 5000 graphics, and would like to know whether it's possible and how to do so.

We can get WebGL partially working by (1) using desktop OpenGL via Qt::AA_UseDesktopOpenGL, (2) applying a patch to web_engine_context.cpp that passes --disable-es3-gl-context, and (3) passing --ignore-gpu-blacklist on the command line. However, something is still wonky with texturing and/or lighting and some WebGL samples do not look correct - geometry is all black. If we pass similar flags to Chrome browser (including --use-gl=deskop, --ignore-gpu-blacklist, and --disable-es3-gl-context), we get the same behavior, which suggests that perhaps the underlying Chromium libraries do not work properly with this hardware.

However, by default, Chrome browser uses ANGLE and everything appears perfectly, so we thought that we could achieve similar performance in Qt. But when we try to use ANGLE in QtWebEngine via Qt::AA_UseOpenGLES, we cannot get WebGL working at all on any computer we've tried (two are NVIDIA/Optimus and one is Intel only). The chrome://gpu page indicates software-only capabilities, since apparently QtWebEngine is passing the --disable-gpu switch when GLES is enabled. When we try to view pages with WebGL content, we get the standard 'WebGL is disabled' message.

Is this the intended behavior? Can ANGLE not work with QtWebEngine to display WebGL content as it does in Chrome browser? Is there _any_ way to get WebGL working properly on our hardware?

This is intended behavior. WebGL will not work if ANGLE is being used by Qt.
ANGLE does not support multi-threaded access to GL contexts, and that is a requirement for the current Qt Quick Scene Graph implementation used by WebEngine.
WebEngine detects that ANGLE is being used, and passes the --disable-gpu to the renderer - to switch to software rendering, and WebGL does not currently work with software rendering.

Thus the only setup that can work with WebGL at the moment is to use Desktop GL, which depends on the quality of the GPU GL drivers.
You can take a look at https://bugreports.qt.io/browse/QTBUG-55604 , and try passing --disable_chromium_framebuffer_multisample together with the the other flags that you mentioned, and see if that helps.

We'd be happy to provide any additional detail or information that we've omitted here. Thanks in advance for any help!

_______________________________________________
QtWebEngine mailing list
QtWebEngine at qt-project.org<mailto:QtWebEngine at qt-project.org>
http://lists.qt-project.org/mailman/listinfo/qtwebengine

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qtwebengine/attachments/20170821/4bfe1c4f/attachment.html>


More information about the QtWebEngine mailing list