Add hasDisplay check after createWsiDisplay throws
authorygole <ygole@nvidia.com>
Wed, 27 Mar 2019 11:38:37 +0000 (17:08 +0530)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Tue, 23 Apr 2019 09:38:18 +0000 (05:38 -0400)
Commit b7efacd7b3 (Check if CTS has platform display for wsi-type) added
checks after createWsiDisplay failure to prevent reporting test failure
if native display for requested wsi-type isn't avaiable. This situation
can occur if vulkan driver supports multiple wsi extensions and only one
native display is available. Change did not fix all the places where
createWsiDisplay is called. The check is missing in file
vktImageMutableTests.cpp so fix it.

Affects: dEQP-VK.image.swapchain_mutable.*

Components: Vulkan, Framework

VK-GL-CTS issue: 1558

Change-Id: Iffc50a70ed48fb18c4d609c8d74b8e4615e4297d

external/vulkancts/modules/vulkan/image/vktImageMutableTests.cpp

index 4ae65dc..c40b219 100644 (file)
@@ -2013,7 +2013,8 @@ MovePtr<Display> createDisplay(const vk::Platform&        platform,
        }
        catch (const tcu::NotSupportedError& e)
        {
-               if (isExtensionSupported(supportedExtensions, RequiredExtension(getExtensionName(wsiType))))
+               if (isExtensionSupported(supportedExtensions, RequiredExtension(getExtensionName(wsiType))) &&
+                   platform.hasDisplay(wsiType))
                {
                        // If VK_KHR_{platform}_surface was supported, vk::Platform implementation
                        // must support creating native display & window for that WSI type.