summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-06-15 12:17:52 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-06-15 15:33:46 +0200
commited231455cc22f6280be917780013584020d208d8 (patch)
tree3bd5791f540733ed50bd08396840f1bbb67e14f3 /src
parent6a8eb26bbafa32ef6561792c52ec72f80007377a (diff)
Relax tst_qvulkan::vulkanVersionRequest to make it compatible with 1.1
The Vulkan spec changed the behavior for VkApplicationInfo::apiVersion in 1.1, conveniently breaking compatibility with all existing 1.0 logic. We can no longer assume that the 1.0 behavior, which was failing instance creation with VK_ERROR_INCOMPATIBLE_DRIVER for an unsupported version, is always in place. So do not rely on this in the test, and add a reminder in QVulkanInstance docs as well. Fixes: QTBUG-85040 Change-Id: I8f5c7a7830877b72d106c444aebfaea191083ee0 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/gui/vulkan/qvulkaninstance.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/vulkan/qvulkaninstance.cpp b/src/gui/vulkan/qvulkaninstance.cpp
index ddee0e47a4..319053dec2 100644
--- a/src/gui/vulkan/qvulkaninstance.cpp
+++ b/src/gui/vulkan/qvulkaninstance.cpp
@@ -531,6 +531,13 @@ void QVulkanInstance::setExtensions(const QByteArrayList &extensions)
\note This function can only be called before create() and has no effect if
called afterwards.
+
+ \note Be aware that Vulkan 1.1 changes the behavior with regards to the
+ Vulkan API version field. In Vulkan 1.0 specifying an unsupported \a
+ vulkanVersion led to failing create() with \c VK_ERROR_INCOMPATIBLE_DRIVER,
+ as was mandated by the specification. Starting with Vulkan 1.1, the
+ specification disallows this, the driver must accept any version without
+ failing the instance creation.
*/
void QVulkanInstance::setApiVersion(const QVersionNumber &vulkanVersion)
{