diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-06-23 16:37:16 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-06-26 15:27:31 +0000 |
commit | a8a8cdd24b99f1d984e8395d77025d1d11817afd (patch) | |
tree | 69622f45bdfff306e59e0c852a98ef88033ca84a /tests/auto/gui/qopenglconfig | |
parent | db377a420207be84b314b836d2756c57a25d057f (diff) |
Add support for driver_description and os.release in GPU blacklists
os.version is the kernel version which is just not very useful or easy to
use for us. Instead, introduce a string that allows easy differentiation
between Windows 7 and 8.
From the adapter identifier the driver description is often helpful too,
especially in virtual machines.
These allow writing rules like:
{ "description": "Use WARP in some Win 8 and 8.1 VMs",
"os": { "type": "win", "release": [ "8", "8.1" ] },
"driver_description": "VMware SVGA 3D",
"features": [ "disable_desktopgl", "disable_d3d9", "disable_d3d11" ]
}
Change-Id: I196f6b44d7bb9e42ef47f61f4c28d8aa79afb7c4
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'tests/auto/gui/qopenglconfig')
-rw-r--r-- | tests/auto/gui/qopenglconfig/buglist.json | 22 | ||||
-rw-r--r-- | tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp | 26 |
2 files changed, 44 insertions, 4 deletions
diff --git a/tests/auto/gui/qopenglconfig/buglist.json b/tests/auto/gui/qopenglconfig/buglist.json index c7b8e61bc8..ef311612b2 100644 --- a/tests/auto/gui/qopenglconfig/buglist.json +++ b/tests/auto/gui/qopenglconfig/buglist.json @@ -103,6 +103,28 @@ ] }, { + "id": 7, + "description": "driver description test", + "driver_description": "Long And Special Driver Description", + "os": { + "type": "win" + }, + "features": [ + "feature2" + ] + }, + { + "id": 8, + "description": "Windows version test", + "os": { + "type": "win", + "release": [ "10" ] + }, + "features": [ + "win10_feature" + ] + }, + { "id": 128, "description": "check for matching GL_VENDOR", "gl_vendor": "The Qt Company", diff --git a/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp b/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp index f88cbdc758..3bf59910f3 100644 --- a/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp +++ b/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp @@ -243,25 +243,43 @@ void tst_QOpenGlConfig::testBugList() QSet<QString> expectedFeatures; expectedFeatures << "feature1"; + // adapter info QVersionNumber driverVersion(QVector<int>() << 9 << 18 << 13 << 4460); - QOpenGLConfig::Gpu gpu = QOpenGLConfig::Gpu::fromDevice(0x10DE, 0x0DE9, driverVersion); + QOpenGLConfig::Gpu gpu = QOpenGLConfig::Gpu::fromDevice(0x10DE, 0x0DE9, driverVersion, QByteArrayLiteral("Unknown")); QSet<QString> actualFeatures = QOpenGLConfig::gpuFeatures(gpu, QStringLiteral("win"), - QVersionNumber(6, 3), fileName); + QVersionNumber(6, 3), QStringLiteral("7"), fileName); QVERIFY2(expectedFeatures == actualFeatures, msgSetMismatch(expectedFeatures, actualFeatures)); + // driver_description + gpu = QOpenGLConfig::Gpu::fromDevice(0xDEAD, 0xBEEF, driverVersion, QByteArrayLiteral("Very Long And Special Driver Description")); + actualFeatures = QOpenGLConfig::gpuFeatures(gpu, QStringLiteral("win"), + QVersionNumber(6, 3), QStringLiteral("8"), fileName); + expectedFeatures = QSet<QString>() << "feature2"; + QVERIFY2(expectedFeatures == actualFeatures, + msgSetMismatch(expectedFeatures, actualFeatures)); + + // os.release + gpu = QOpenGLConfig::Gpu::fromDevice(0xDEAD, 0xBEEF, driverVersion, QByteArrayLiteral("WinVerTest")); + actualFeatures = QOpenGLConfig::gpuFeatures(gpu, QStringLiteral("win"), + QVersionNumber(12, 34), QStringLiteral("10"), fileName); + expectedFeatures = QSet<QString>() << "win10_feature"; + QVERIFY2(expectedFeatures == actualFeatures, + msgSetMismatch(expectedFeatures, actualFeatures)); + + // gl_vendor gpu = QOpenGLConfig::Gpu::fromGLVendor(QByteArrayLiteral("Somebody Else")); expectedFeatures.clear(); actualFeatures = QOpenGLConfig::gpuFeatures(gpu, QStringLiteral("linux"), - QVersionNumber(1, 0), fileName); + QVersionNumber(1, 0), QString(), fileName); QVERIFY2(expectedFeatures == actualFeatures, msgSetMismatch(expectedFeatures, actualFeatures)); gpu = QOpenGLConfig::Gpu::fromGLVendor(QByteArrayLiteral("The Qt Company")); expectedFeatures = QSet<QString>() << "cool_feature"; actualFeatures = QOpenGLConfig::gpuFeatures(gpu, QStringLiteral("linux"), - QVersionNumber(1, 0), fileName); + QVersionNumber(1, 0), QString(), fileName); QVERIFY2(expectedFeatures == actualFeatures, msgSetMismatch(expectedFeatures, actualFeatures)); } |