From d8281a92b8eb1c5fa3e430c296f22a713cbe1808 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 1 Apr 2014 13:25:18 +0200 Subject: Do not set fwdcompat bit for a compatibility profile QGLFormat AMD drivers do weird things. Provide a workaround. Task-number: QTBUG-37909 Change-Id: Idabd6ebb6e1447cb9bd92c7711a50aaa8575b9d6 Reviewed-by: Sean Harmer --- src/opengl/qgl_qpa.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/opengl/qgl_qpa.cpp b/src/opengl/qgl_qpa.cpp index fe4d1c363c..10e6ffde46 100644 --- a/src/opengl/qgl_qpa.cpp +++ b/src/opengl/qgl_qpa.cpp @@ -109,6 +109,11 @@ QSurfaceFormat QGLFormat::toSurfaceFormat(const QGLFormat &format) retFormat.setMajorVersion(format.majorVersion()); retFormat.setMinorVersion(format.minorVersion()); retFormat.setProfile(static_cast(format.profile())); + // QGLFormat has no way to set DeprecatedFunctions, that is, to tell that forward + // compatibility should not be requested. Some drivers fail to ignore the fwdcompat + // bit with compatibility profiles so make sure it is not set. + if (format.profile() == QGLFormat::CompatibilityProfile) + retFormat.setOption(QSurfaceFormat::DeprecatedFunctions); return retFormat; } -- cgit v1.2.3