Set patch version to 0 on test startup
authorGraeme Leese <gleese@broadcom.com>
Fri, 28 Sep 2018 13:57:13 +0000 (14:57 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Sat, 29 Sep 2018 05:34:45 +0000 (01:34 -0400)
Some parts of the test expect the ApiVersion to have a patch level of 0
so set this explicitly on startup. This was happening accidentally for
VK1.1 devices because the version is set as min(loader, device) and the
loader version is always 1.1.0.

Components: Vulkan
Affects: dEQP-VK.*
VK-GL-CTS Issue: 1391

Change-Id: If3b59408628e5b4a91e0f367bd6b17ca67f69e58

external/vulkancts/modules/vulkan/vktTestCase.cpp

index b0d1a1c..22c61a1 100644 (file)
@@ -459,10 +459,15 @@ private:
 
 };
 
+static deUint32 sanitizeApiVersion(deUint32 v)
+{
+       return VK_MAKE_VERSION( VK_VERSION_MAJOR(v), VK_VERSION_MINOR(v), 0 );
+}
+
 DefaultDevice::DefaultDevice (const PlatformInterface& vkPlatform, const tcu::CommandLine& cmdLine)
        : m_availableInstanceVersion    (getTargetInstanceVersion(vkPlatform))
        , m_deviceVersions                              (determineDeviceVersions(vkPlatform, m_availableInstanceVersion, cmdLine))
-       , m_usedApiVersion                              (deMinu32(m_availableInstanceVersion, m_deviceVersions.first))
+       , m_usedApiVersion                              (sanitizeApiVersion(deMinu32(m_availableInstanceVersion, m_deviceVersions.first)))
 
        , m_instanceExtensions                  (addCoreInstanceExtensions(filterExtensions(enumerateInstanceExtensionProperties(vkPlatform, DE_NULL)), m_usedApiVersion))
        , m_instance                                    (createInstance(vkPlatform, m_usedApiVersion, m_instanceExtensions, cmdLine))