aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgrhisupport.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-05-14 14:07:15 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-05-14 14:07:15 +0200
commit3ed33ec74b70bbac016dd080889bb3df3a78d90c (patch)
treea7dfaa6a921e43435757a629c6e2a86a721b1460 /src/quick/scenegraph/qsgrhisupport.cpp
parent8279fb44cba551e139f307217da24d3f26a86c2e (diff)
parent5a3d9309ec018445a3471d40366f41ee2f6ebef7 (diff)
Merge remote-tracking branch 'origin/5.15.0' into 5.15
Diffstat (limited to 'src/quick/scenegraph/qsgrhisupport.cpp')
-rw-r--r--src/quick/scenegraph/qsgrhisupport.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/quick/scenegraph/qsgrhisupport.cpp b/src/quick/scenegraph/qsgrhisupport.cpp
index 7cf4df2aa3..0df19c247f 100644
--- a/src/quick/scenegraph/qsgrhisupport.cpp
+++ b/src/quick/scenegraph/qsgrhisupport.cpp
@@ -391,12 +391,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;
@@ -433,6 +434,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)