summaryrefslogtreecommitdiffstats
path: root/tests/manual/rhi/offscreen/offscreen.cpp
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2024-03-18 21:55:12 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2024-03-19 14:52:48 +0100
commit14ec2ab89fa3347f95170d6980a6c793b7f37424 (patch)
tree88686ff27beffaa7f98a0639777a51ab36cbd05e /tests/manual/rhi/offscreen/offscreen.cpp
parente8e029e2a5573eecd7358cd5ed66afa89debb306 (diff)
Add configure feature for Metal
Simplifies maintenance of code paths that rely on Metal. Change-Id: I1d1f705fffc14dbafde346eeb555b43be6d5be54 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'tests/manual/rhi/offscreen/offscreen.cpp')
-rw-r--r--tests/manual/rhi/offscreen/offscreen.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/manual/rhi/offscreen/offscreen.cpp b/tests/manual/rhi/offscreen/offscreen.cpp
index c9b3f6ecb7..86bf5ad5a9 100644
--- a/tests/manual/rhi/offscreen/offscreen.cpp
+++ b/tests/manual/rhi/offscreen/offscreen.cpp
@@ -68,7 +68,7 @@ int main(int argc, char **argv)
#if defined(Q_OS_WIN)
graphicsApi = D3D11;
-#elif defined(Q_OS_MACOS) || defined(Q_OS_IOS)
+#elif QT_CONFIG(metal)
graphicsApi = Metal;
#elif QT_CONFIG(vulkan)
graphicsApi = Vulkan;
@@ -154,7 +154,7 @@ int main(int argc, char **argv)
}
#endif
-#if defined(Q_OS_MACOS) || defined(Q_OS_IOS)
+#if QT_CONFIG(metal)
if (graphicsApi == Metal) {
QRhiMetalInitParams params;
r = QRhi::create(QRhi::Metal, &params, rhiFlags);