aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-11-06 17:52:41 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-11-09 18:29:12 +0000
commitba40fddd2c75cf0791bbe31015f9ecd250639123 (patch)
treea302f7b96a31867ab6e9f4363db213bade33a703 /src/quick/scenegraph
parentebe36705223d00bfe92c7b8fc391e97895ba1155 (diff)
Silence unused warning in QSGRhiSupport in uncommon build configs
Fixes: QTBUG-88235 Change-Id: I47c20f46c77630c47a8bda7dfe6b080eafa8f4d7 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r--src/quick/scenegraph/qsgrhisupport.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/quick/scenegraph/qsgrhisupport.cpp b/src/quick/scenegraph/qsgrhisupport.cpp
index 8a7274f947..8fb657e44b 100644
--- a/src/quick/scenegraph/qsgrhisupport.cpp
+++ b/src/quick/scenegraph/qsgrhisupport.cpp
@@ -566,10 +566,6 @@ void QSGRhiSupport::prepareWindowForRhi(QQuickWindow *window)
// must be called on the render thread
QRhi *QSGRhiSupport::createRhi(QQuickWindow *window, QOffscreenSurface *offscreenSurface)
{
- QQuickWindowPrivate *wd = QQuickWindowPrivate::get(window);
- const QQuickGraphicsDevice &customDev(wd->customDeviceObjects);
- const QQuickGraphicsDevicePrivate *customDevD = QQuickGraphicsDevicePrivate::get(&customDev);
-
QRhi *rhi = nullptr;
QRhi::Flags flags;
@@ -585,6 +581,8 @@ QRhi *QSGRhiSupport::createRhi(QQuickWindow *window, QOffscreenSurface *offscree
}
#if QT_CONFIG(opengl)
if (backend == QRhi::OpenGLES2) {
+ QQuickWindowPrivate *wd = QQuickWindowPrivate::get(window);
+ const QQuickGraphicsDevicePrivate *customDevD = QQuickGraphicsDevicePrivate::get(&wd->customDeviceObjects);
const QSurfaceFormat format = window->requestedFormat();
QRhiGles2InitParams rhiParams;
rhiParams.format = format;
@@ -604,6 +602,8 @@ QRhi *QSGRhiSupport::createRhi(QQuickWindow *window, QOffscreenSurface *offscree
#endif
#if QT_CONFIG(vulkan)
if (backend == QRhi::Vulkan) {
+ QQuickWindowPrivate *wd = QQuickWindowPrivate::get(window);
+ const QQuickGraphicsDevicePrivate *customDevD = QQuickGraphicsDevicePrivate::get(&wd->customDeviceObjects);
QRhiVulkanInitParams rhiParams;
prepareWindowForRhi(window); // sets a vulkanInstance if not yet present
rhiParams.inst = window->vulkanInstance();
@@ -633,6 +633,8 @@ QRhi *QSGRhiSupport::createRhi(QQuickWindow *window, QOffscreenSurface *offscree
#endif
#ifdef Q_OS_WIN
if (backend == QRhi::D3D11) {
+ QQuickWindowPrivate *wd = QQuickWindowPrivate::get(window);
+ const QQuickGraphicsDevicePrivate *customDevD = QQuickGraphicsDevicePrivate::get(&wd->customDeviceObjects);
QRhiD3D11InitParams rhiParams;
rhiParams.enableDebugLayer = isDebugLayerRequested();
if (m_killDeviceFrameCount > 0) {
@@ -661,6 +663,8 @@ QRhi *QSGRhiSupport::createRhi(QQuickWindow *window, QOffscreenSurface *offscree
#endif
#if defined(Q_OS_MACOS) || defined(Q_OS_IOS)
if (backend == QRhi::Metal) {
+ QQuickWindowPrivate *wd = QQuickWindowPrivate::get(window);
+ const QQuickGraphicsDevicePrivate *customDevD = QQuickGraphicsDevicePrivate::get(&wd->customDeviceObjects);
QRhiMetalInitParams rhiParams;
if (customDevD->type == QQuickGraphicsDevicePrivate::Type::DeviceAndCommandQueue) {
QRhiMetalNativeHandles importDev;