summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2021-01-20 14:04:47 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2021-01-21 17:00:32 +0100
commit46b892c16c4c9fd10a04bc6d695d1e47bc52a84d (patch)
tree378a542cadcea219a743ed9afb8ded1c7d53b006
parent3861ec735e669aa43c2a0177f948b84d8cac0797 (diff)
tst_qvulkan: Skip assumption about supportedApiVersion
...when the platform does not support Vulkan. The version is left at the default 0 then, so checking for >= 1.0 is wrong. This allows the test to pass with the offscreen platform plugin. Change-Id: I5afba8f1e703e4fa0ff41da91d18f5fabfb54868 Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
-rw-r--r--tests/auto/gui/qvulkan/tst_qvulkan.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/gui/qvulkan/tst_qvulkan.cpp b/tests/auto/gui/qvulkan/tst_qvulkan.cpp
index 5b425158f9..79794f7bdf 100644
--- a/tests/auto/gui/qvulkan/tst_qvulkan.cpp
+++ b/tests/auto/gui/qvulkan/tst_qvulkan.cpp
@@ -100,13 +100,14 @@ void tst_QVulkan::vulkanCheckSupported()
qDebug() << ve;
QVERIFY(!inst.isValid());
+ const QVersionNumber supportedApiVersion = inst.supportedApiVersion();
+ qDebug() << supportedApiVersion.majorVersion() << supportedApiVersion.minorVersion();
+
if (inst.create()) { // skip the rest when Vulkan is not supported at all
QVERIFY(!ve.isEmpty());
QVERIFY(ve == inst.supportedExtensions());
+ QVERIFY(supportedApiVersion.majorVersion() >= 1);
}
-
- qDebug() << inst.supportedApiVersion();
- QVERIFY(inst.supportedApiVersion().majorVersion() >= 1);
}
void tst_QVulkan::vulkan11()