From fee8848297ba43e2910e89b0b3af3b7fee3ef008 Mon Sep 17 00:00:00 2001 From: Unseon Ryu Date: Mon, 6 Apr 2020 14:02:06 +0900 Subject: [PATCH] fix incorrect GaussianBlur shader code generation m_quickView in Qt5NodeInstanceServer::initializeView() is instantiated with setProfile(QSurfaceFormat::CoreProfile) However QGfxShaderBuilder::QGfxShaderBuilder() initiates and generate the gaussian blur shader code with referring default format. that doesn't set the profile to QSurfaceFormat::CoreProfile. The correct resolution is to get profile with accessing current window. But QGfxShaderBuilder is not QQuickItem so it doesn't have any way to access current window. As qmlscene does, it could be a nice solution to keep the current surface format as default when instantiating QQuickView. Fixes: QDS-1864 Change-Id: I0fcf80effccebf7cfe8e58c071cf121b6af5bdbd Reviewed-by: Mahmoud Badri --- .../qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.cpp index 822ffd4f1c7..8a4b086aa55 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.cpp @@ -67,6 +67,8 @@ void Qt5NodeInstanceServer::initializeView() QSurfaceFormat surfaceFormat = m_quickView->requestedFormat(); surfaceFormat.setVersion(4, 1); surfaceFormat.setProfile(QSurfaceFormat::CoreProfile); + QSurfaceFormat::setDefaultFormat(surfaceFormat); + m_quickView->setFormat(surfaceFormat); DesignerSupport::createOpenGLContext(m_quickView.data());