diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-11-13 16:35:11 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-11-27 21:50:52 +0100 |
commit | df0cb0edac85db1fe12442d332bafc1d508bc3ae (patch) | |
tree | 843ccc014623b0200a698b6916f7a926bc88ede4 /src/quick/scenegraph/qsgrhisupport.cpp | |
parent | f6e90ba533b9b4b98cfcae3d31731c1cb794ee77 (diff) |
Fix Metal usage on iOS
Also enable the two Metal-specific scenegraph examples on iOS.
Change-Id: I0e1e6d527544ea4a5bfb0d08ca2d32c762d3c699
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/quick/scenegraph/qsgrhisupport.cpp')
-rw-r--r-- | src/quick/scenegraph/qsgrhisupport.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/quick/scenegraph/qsgrhisupport.cpp b/src/quick/scenegraph/qsgrhisupport.cpp index 34325a35f3..38c2ef9612 100644 --- a/src/quick/scenegraph/qsgrhisupport.cpp +++ b/src/quick/scenegraph/qsgrhisupport.cpp @@ -159,7 +159,7 @@ void QSGRhiSupport::applySettings() } else { #if defined(Q_OS_WIN) m_rhiBackend = QRhi::D3D11; -#elif defined(Q_OS_DARWIN) +#elif defined(Q_OS_MACOS) || defined(Q_OS_IOS) m_rhiBackend = QRhi::Metal; #else m_rhiBackend = QRhi::OpenGLES2; @@ -350,7 +350,7 @@ static const void *qsgrhi_d3d11_rifResource(QSGRendererInterface::Resource res, } #endif -#ifdef Q_OS_DARWIN +#if defined(Q_OS_MACOS) || defined(Q_OS_IOS) static const void *qsgrhi_mtl_rifResource(QSGRendererInterface::Resource res, const QRhiNativeHandles *nat, const QRhiNativeHandles *cbNat) { @@ -408,7 +408,7 @@ const void *QSGRhiSupport::rifResource(QSGRendererInterface::Resource res, const case QRhi::D3D11: return qsgrhi_d3d11_rifResource(res, nat); #endif -#ifdef Q_OS_DARWIN +#if defined(Q_OS_MACOS) || defined(Q_OS_IOS) case QRhi::Metal: { QRhiCommandBuffer *cb = rc->currentFrameCommandBuffer(); @@ -507,7 +507,7 @@ QRhi *QSGRhiSupport::createRhi(QWindow *window, QOffscreenSurface *offscreenSurf rhi = QRhi::create(backend, &rhiParams, flags); } #endif -#ifdef Q_OS_DARWIN +#if defined(Q_OS_MACOS) || defined(Q_OS_IOS) if (backend == QRhi::Metal) { QRhiMetalInitParams rhiParams; rhi = QRhi::create(backend, &rhiParams, flags); |