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>
bb10
Laszlo Agocs 2021-01-20 14:04:47 +01:00
parent 3861ec735e
commit 46b892c16c
1 changed files with 4 additions and 3 deletions

View File

@ -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()