From 8da171a5aee304421ca0cd2f5c20c9bfa8205dc1 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 4 Jan 2021 12:46:54 +0100 Subject: [PATCH] Adjust surface type usage for onscreen tests in tst_qrhi Change-Id: I1ae076f8bb44e00bf9ff7706063344e8c5502101 Reviewed-by: Andy Nichols --- tests/auto/gui/rhi/qrhi/tst_qrhi.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp b/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp index 877f8f9c17..6dbd0599e4 100644 --- a/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp +++ b/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp @@ -2754,23 +2754,24 @@ void tst_QRhi::renderToTextureMultipleUniformBuffersAndDynamicOffset() void tst_QRhi::setWindowType(QWindow *window, QRhi::Implementation impl) { switch (impl) { +#ifdef TST_GL case QRhi::OpenGLES2: -#if QT_CONFIG(opengl) window->setFormat(QRhiGles2InitParams::adjustedFormat()); -#endif - Q_FALLTHROUGH(); - case QRhi::D3D11: window->setSurfaceType(QSurface::OpenGLSurface); break; +#endif + case QRhi::D3D11: + window->setSurfaceType(QSurface::Direct3DSurface); + break; case QRhi::Metal: window->setSurfaceType(QSurface::MetalSurface); break; +#ifdef TST_VK case QRhi::Vulkan: window->setSurfaceType(QSurface::VulkanSurface); -#if QT_CONFIG(vulkan) window->setVulkanInstance(&vulkanInstance); -#endif break; +#endif default: break; }