diff options
author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2023-03-23 21:06:47 +0200 |
---|---|---|
committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2023-03-23 21:06:47 +0200 |
commit | 42e4ae042a4c86e58bcb8b6d2d59ba4a988285b4 (patch) | |
tree | a7f25b1d335a834a7c3ae104cee913ef3a4dd4fb /tests/auto/gui/qvulkan/tst_qvulkan.cpp | |
parent | 4ee4fc18b4067b90efa46ca9baba74f53b54d9ec (diff) | |
parent | 168ff3419f256fdb35b586275d293fc0cd773fe1 (diff) |
Merge remote-tracking branch 'origin/tqtc/lts-5.15.9' into tqtc/lts-5.15-opensourcev5.15.9-lts-lgpl
Change-Id: Iaff6b55275e50d19973e1020853d8622587069f9
Diffstat (limited to 'tests/auto/gui/qvulkan/tst_qvulkan.cpp')
-rw-r--r-- | tests/auto/gui/qvulkan/tst_qvulkan.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/auto/gui/qvulkan/tst_qvulkan.cpp b/tests/auto/gui/qvulkan/tst_qvulkan.cpp index c80c3fed97..3315ae5225 100644 --- a/tests/auto/gui/qvulkan/tst_qvulkan.cpp +++ b/tests/auto/gui/qvulkan/tst_qvulkan.cpp @@ -153,8 +153,15 @@ void tst_QVulkan::vulkanVersionRequest() inst.destroy(); inst.setApiVersion(QVersionNumber(10, 0, 0)); - QVERIFY(!inst.create()); - QCOMPARE(inst.errorCode(), VK_ERROR_INCOMPATIBLE_DRIVER); + + bool result = inst.create(); + + // Starting with Vulkan 1.1 the spec does not allow the implementation to + // fail the instance creation. So check for the 1.0 behavior only when + // create() failed, skip this verification with 1.1+ (where create() will + // succeed for any bogus api version). + if (!result) + QCOMPARE(inst.errorCode(), VK_ERROR_INCOMPATIBLE_DRIVER); } static void waitForUnexposed(QWindow *w) |