Go to file
Eskil Abrahamsen Blomfeldt ee7573f61f Callbacks for begin/end of a frame on OpenGL
The background for this is that when running Wayland, the
Mesa driver has an issue which makes it crash if we call
eglDestroySurface() while we are rendering to it. This is
not according to the documentation, and it only seems to
happen on Mesa and only on Wayland, so it is probably
related to something in the Wayland implementation in the
driver.

Since this driver is very popular, we want to work around it,
which can easily be done using existing locking mechanisms
in the Qt Wayland QPA plugin. But in order to do so, we need
reliable callbacks for the start and end of a frame. The RHI
already has this, so we just need to channel the information
to the QPA plugin.

Having beginFrame/endFrame hooks in the QPlatformOpenGLContext
could be useful in other cases as well, especially knowing that
there are OpenGL implementations that require some extra thread
protection.

QPlatformSurface would be a more general location for these
hooks, but since the issue is only seen on OpenGL and
multi-threading is handled more explicitly in other APIs,
we don't want to expose this API in a more general location
than necessary.

Task-number: QTBUG-92249
Change-Id: I97ce7d4f744c4b28eec457e919d1c9652ff00079
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-12-08 21:08:04 +01:00
.github/workflows Repair github action workflow 2021-11-10 18:57:33 +01:00
bin Provide a qtpaths wrapper script when cross-building Qt 2021-11-08 13:41:03 +01:00
cmake wasm: update recommended emscripten to 3.0.0 2021-12-09 03:22:36 +10:00
coin Exclude INTEGRITY artifacts from Archivation step on CI 2021-12-02 20:09:40 +02:00
config.tests wasm: add simd support 2021-10-05 11:30:06 +10:00
dist Add Qt 6.0.0 changes file 2020-11-16 10:02:08 +02:00
doc Drop Qt4 support 2021-12-07 01:56:17 +03:00
examples Rasterwindow: Remove unneeded find_package 2021-12-06 14:42:45 +01:00
lib Purge all fonts 2015-08-18 19:59:14 +00:00
libexec Fix various configure time warnings about missing QT_BEGIN_NAMESPACE 2021-11-01 17:17:29 +02:00
mkspecs wasm: update recommended emscripten to 3.0.0 2021-12-09 03:22:36 +10:00
qmake Fix size_t / int conversion warnings in qmake 2021-12-02 15:16:49 +01:00
src Callbacks for begin/end of a frame on OpenGL 2021-12-08 21:08:04 +01:00
tests QVarLengthArray: fix size update on failed append() 2021-12-08 16:39:27 +00:00
util Say hello to qtwasmserver 2021-12-06 16:36:09 +01:00
.cmake.conf Revert "CMake: Warn if cmake_minimum_required has an unsupported low version" 2021-10-04 15:55:10 +02:00
.gitattributes Give batch files CRLF line endings 2020-11-04 15:02:29 +00:00
.gitignore Assume qhelpgenerator in libexec instead of bin 2021-11-08 19:27:32 +01:00
.lgtm.yml Skip LGTM analysis for the bootstrap library and tools 2020-07-16 01:04:34 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
CMakeLists.txt Add _make_aab target 2021-11-30 20:16:13 +01:00
conanfile.py use short_path attribute 2021-12-07 14:19:38 +00:00
config_help.txt Document that schannel is on by default 2021-10-06 15:05:20 +02:00
configure Remove unsupported, host-related options from configure shell script 2021-08-05 02:44:27 +02:00
configure.bat Fix our usage of CMake script mode in Windows configure 2021-08-20 19:44:43 +02:00
configure.cmake wasm: add simd support 2021-10-05 11:30:06 +10:00
dependencies.yaml Re-add dependencies.yaml now that qt5.git wip/qt6 builds fine 2019-09-18 13:19:31 +02:00
LICENSE.FDL Remove trailing whitespace in LICENSE.FDL 2021-11-26 18:28:49 +01:00
LICENSE.GPL2 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3-EXCEPT Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.QT-LICENSE-AGREEMENT Update latest qt license agreement 2021-12-02 14:16:49 +00:00
qt_cmdline.cmake configure: Remove vestiges of handling QMAKE_* variable assignments 2021-11-24 10:47:10 +01:00
sync.profile Implement generating of a module cpp export header 2021-06-24 20:40:49 +02:00