From 51979cfa172ebd89cf0235c6d8b6ccb97610c04d Mon Sep 17 00:00:00 2001 From: Lauri Pohjanheimo Date: Mon, 3 Feb 2025 15:57:01 +0200 Subject: [PATCH] Unblacklist tst_QRhi::RenderToFloatTexture and skip on Android-Sim On CI an Android emulator with SwiftShader software graphics implementation is used. SwiftShader implementation is unable to emulate this OpenGL functionality. Blacklisting removed. QSKIP the test if it is run in Android platform, OpenGL and SwiftShader sw graphics implementation is found. Task-number: QTQAINFRA-6332 Change-Id: I241a2c6772291795d26b9c2a563f4f9412605cf6 Reviewed-by: Axel Spoerl --- tests/auto/gui/rhi/qrhi/BLACKLIST | 5 ++--- tests/auto/gui/rhi/qrhi/tst_qrhi.cpp | 23 ++++++++++++++++++----- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/tests/auto/gui/rhi/qrhi/BLACKLIST b/tests/auto/gui/rhi/qrhi/BLACKLIST index a0b8a45b571..3df7f70c5fc 100644 --- a/tests/auto/gui/rhi/qrhi/BLACKLIST +++ b/tests/auto/gui/rhi/qrhi/BLACKLIST @@ -4,10 +4,9 @@ android # QTBUG-92211 [renderPassDescriptorCompatibility] android -# Ditto +# Skip 3D textures on Android emulator: Software GL implementation doesn't work and GLES 3.0 +# won't be available. [renderToTextureSampleWithSeparateTextureAndSampler] android -[renderToFloatTexture] -android [tessellation vulkan] android diff --git a/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp b/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp index bb713a3e23b..57f5d175ef8 100644 --- a/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp +++ b/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp @@ -165,6 +165,7 @@ private slots: private: void setWindowType(QWindow *window, QRhi::Implementation impl); + bool isAndroidOpenGLSwiftShader(QRhi::Implementation impl, const QRhi *rhi); struct { QRhiNullInitParams null; @@ -261,6 +262,15 @@ void tst_QRhi::rhiTestData() #endif } +bool tst_QRhi::isAndroidOpenGLSwiftShader(QRhi::Implementation impl, const QRhi *rhi) +{ +#ifdef Q_OS_ANDROID + if (impl == QRhi::OpenGLES2 && rhi->driverInfo().deviceName.contains("SwiftShader")) + return true; +#endif + return false; +} + void tst_QRhi::create_data() { rhiTestData(); @@ -6184,6 +6194,11 @@ void tst_QRhi::renderToFloatTexture() if (!rhi->isTextureFormatSupported(QRhiTexture::RGBA16F)) QSKIP("RGBA16F is not supported, skipping test"); + if (isAndroidOpenGLSwiftShader(impl, rhi.get())) { + QSKIP("SwiftShader software acceleration is used which does not support this OpenGLES " + "feature. See QTBUG-132934"); + } + const QSize outputSize(1920, 1080); QScopedPointer texture(rhi->newTexture(QRhiTexture::RGBA16F, outputSize, 1, QRhiTexture::RenderTarget | QRhiTexture::UsedAsTransferSource)); @@ -6273,12 +6288,10 @@ void tst_QRhi::renderToRgb10Texture() if (!rhi->isTextureFormatSupported(QRhiTexture::RGB10A2)) QSKIP("RGB10A2 is not supported, skipping test"); -#ifdef Q_OS_ANDROID - if (impl == QRhi::OpenGLES2) { - if (rhi->driverInfo().deviceName.contains("SwiftShader")) - QSKIP("SwiftShader software acceleration is used which does not support this OpenGLES feature. See QTBUG-132934"); + if (isAndroidOpenGLSwiftShader(impl, rhi.get())) { + QSKIP("SwiftShader software acceleration is used which does not support this OpenGLES " + "feature. See QTBUG-132934"); } -#endif const QSize outputSize(1920, 1080); QScopedPointer texture(rhi->newTexture(QRhiTexture::RGB10A2, outputSize, 1,