Problem reported in FreeCAD bug tracker: https://github.com/FreeCAD/FreeCAD/issues/9698
Bug fixed in Qt 5.15.11: https://bugreports.qt.io/browse/QTBUG-101396
The patch for Qt6 needs a small tweak to work on Qt5 (confirmed) https://codereview.qt-project.org/c/qt/qtbase/+/430334
Port of the 5.15 change. It is not strictly required for Qt 6 since the
immediate problem of failing to compile some of the shaders with some
drivers will pop up much more rarely in practice, because neither
Multimedia nor the backing store compositor for
QOpenGLWidget/QQuickWidget use QOpenGLTextureBlitter in 6.4 and newer.
To maintain the internal behavior between 5 and 6, the patch is
nonetheless ported to Qt 6. It also has a performance benefit for
the users of the blitter, because now the special shader variants
(for rectangle or external textures) are only created when needed.