Skip to content

FIX: #2446 qtbase: QOpenGL shader crash on Windows with several buggy GPU drivers

Julien Maille requested to merge nefast/qtbase:kde/5.15 into kde/5.15

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

From 72dd23cf Mon Sep 17 00:00:00 2001
From: Laszlo Agocs laszlo.agocs@qt.io
Date: Fri, 02 Sep 2022 14:11:18 +0200
Subject: [PATCH] Defer creating the special shaders in the texture blitter

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.

Task-number: QTBUG-101396
Change-Id: I1cf4bec0c74045f4b6f94765563254026bf0b7d8
Reviewed-by: Qt CI Bot qt_ci_bot@qt-project.org
Reviewed-by: Andy Nichols andy.nichols@qt.io

Edited by Julien Maille

Merge request reports