From: Graeme Leese Date: Fri, 28 Sep 2018 13:57:13 +0000 (+0100) Subject: Set patch version to 0 on test startup X-Git-Tag: upstream/1.3.5~2324^2~85 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dee333fa3a0e3dc5ff26d245af65b048d1e5fda8;p=platform%2Fupstream%2FVK-GL-CTS.git Set patch version to 0 on test startup 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 --- diff --git a/external/vulkancts/modules/vulkan/vktTestCase.cpp b/external/vulkancts/modules/vulkan/vktTestCase.cpp index b0d1a1c..22c61a1 100644 --- a/external/vulkancts/modules/vulkan/vktTestCase.cpp +++ b/external/vulkancts/modules/vulkan/vktTestCase.cpp @@ -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))