Add handle compatibility check in win32 keyed mutex tests
authorIgor Ostrowski <igor.ostrowski@intel.com>
Tue, 12 Mar 2019 10:36:10 +0000 (11:36 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 29 Mar 2019 10:02:35 +0000 (06:02 -0400)
Affects:
dEQP-VK.synchronization.win32_keyed_mutex.*

Components: Vulkan
VK-GL-CTS issue: 1669

Change-Id: I1ce4edae009d291100725fce9d87ae6ac826c4ae

external/vulkancts/modules/vulkan/synchronization/vktSynchronizationWin32KeyedMutexTests.cpp

index 69946b7..e6dcf6e 100644 (file)
@@ -1497,7 +1497,10 @@ Win32KeyedMutexTestInstance::Win32KeyedMutexTestInstance (Context&               context,
                                0u,
                        }
                };
-               VK_CHECK(m_vki.getPhysicalDeviceImageFormatProperties2(m_physicalDevice, &imageFormatInfo, &formatProperties));
+               const vk::VkResult res = m_vki.getPhysicalDeviceImageFormatProperties2(m_physicalDevice, &imageFormatInfo, &formatProperties);
+               if (res == vk::VK_ERROR_FORMAT_NOT_SUPPORTED)
+                       TCU_THROW(NotSupportedError, "Handle type is not compatible");
+               VK_CHECK(res);
 
                // \todo How to log this nicely?
                log << TestLog::Message << "External image format properties: " << imageFormatInfo << "\n"<< externalProperties << TestLog::EndMessage;