diff options
author | Liang Qi <liang.qi@qt.io> | 2020-05-15 09:01:29 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2020-05-15 09:01:29 +0200 |
commit | 0ae26f8c574411cbab748128a317cc08dafe2382 (patch) | |
tree | 41437d5d0ff7cc714ff37be23b25ca7ce6b792a6 /src/quick/scenegraph/qsgrhisupport.cpp | |
parent | d4042c8cd82b35b3ec67c4309d80c9c92f55d889 (diff) | |
parent | 3ed33ec74b70bbac016dd080889bb3df3a78d90c (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
tests/auto/quick/qquicktextedit/BLACKLIST
Change-Id: If1868d27ea40fdc206971c2f7a24e91c5e62b1bf
Diffstat (limited to 'src/quick/scenegraph/qsgrhisupport.cpp')
-rw-r--r-- | src/quick/scenegraph/qsgrhisupport.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/quick/scenegraph/qsgrhisupport.cpp b/src/quick/scenegraph/qsgrhisupport.cpp index ffc07a2791..b86667a972 100644 --- a/src/quick/scenegraph/qsgrhisupport.cpp +++ b/src/quick/scenegraph/qsgrhisupport.cpp @@ -438,12 +438,13 @@ static const void *qsgrhi_mtl_rifResource(QSGRendererInterface::Resource res, co const void *QSGRhiSupport::rifResource(QSGRendererInterface::Resource res, const QSGDefaultRenderContext *rc) { +// ### This condition is a temporary workaround to allow compilation +// with -no-opengl, but Vulkan or Metal enabled, to succeed. Full +// support for RHI-capable -no-opengl builds will be available in +// Qt 6 once the direct OpenGL code path gets removed. #if QT_CONFIG(opengl) + QRhi *rhi = rc->rhi(); -#else - Q_UNUSED(rc) - QRhi *rhi = nullptr; -#endif if (res == QSGRendererInterface::RhiResource || !rhi) return rhi; @@ -480,6 +481,12 @@ const void *QSGRhiSupport::rifResource(QSGRendererInterface::Resource res, default: return nullptr; } + +#else + Q_UNUSED(res); + Q_UNUSED(rc); + return nullptr; +#endif } int QSGRhiSupport::chooseSampleCountForWindowWithRhi(QWindow *window, QRhi *rhi) |