From 09ee9ef65da985707f6e7bcc0e71ca680a8ea12b Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 31 Oct 2019 14:20:37 +0100 Subject: Avoid EGL_BAD_MATCH in tst_qrhi autotest Call adjustedFormat() as advised by the docs: "Applications are advised to set this format on their QWindow in order to avoid potential BAD_MATCH failures." Task-number: QTBUG-79659 Change-Id: Ibf415fb0ee64bdd3f01d4ba744244bce811c0d27 Reviewed-by: Paul Olav Tvete --- tests/auto/gui/rhi/qrhi/tst_qrhi.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp b/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp index 768b227ecd..533d6b17b1 100644 --- a/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp +++ b/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp @@ -1590,6 +1590,9 @@ void tst_QRhi::renderToWindowSimple() QScopedPointer window(new QWindow); switch (impl) { case QRhi::OpenGLES2: +#if QT_CONFIG(opengl) + window->setFormat(QRhiGles2InitParams::adjustedFormat()); +#endif Q_FALLTHROUGH(); case QRhi::D3D11: window->setSurfaceType(QSurface::OpenGLSurface); -- cgit v1.2.3