diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2021-01-04 12:46:54 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2021-01-04 17:30:37 +0100 |
commit | 8da171a5aee304421ca0cd2f5c20c9bfa8205dc1 (patch) | |
tree | 6565375f6ee42662d3846c2283c487576fbb5fd2 | |
parent | f6cb24f4c0f1f48f9010ba78670577ff5643132f (diff) |
Adjust surface type usage for onscreen tests in tst_qrhi
Change-Id: I1ae076f8bb44e00bf9ff7706063344e8c5502101
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
-rw-r--r-- | tests/auto/gui/rhi/qrhi/tst_qrhi.cpp | 11 |
1 files changed, 6 insertions, 5 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()); + window->setSurfaceType(QSurface::OpenGLSurface); + break; #endif - Q_FALLTHROUGH(); case QRhi::D3D11: - window->setSurfaceType(QSurface::OpenGLSurface); + 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; } |