From 5e372abdf23e14ca68715da7142026fee8ceb533 Mon Sep 17 00:00:00 2001 From: Tony Zlatinski Date: Tue, 16 Jun 2020 08:04:08 -0500 Subject: [PATCH] Linux WSI checks the WS availability on create Before creating a display of a specific WSI type, check for the server availability, first. If the display server of the requested WSI type (XLIB/XCB/WAYLAND) is not present/running, then when throw an exception of type NotSupportedError rather than one of type ResourceError. This would allow for the tests to be marked as unsupported, rather than causing the CTS to crash/exit. Affects: dEQP-VK.wsi.wayland.* dEQP-VK.wsi.xcb.* dEQP-VK.wsi.xlib.* dEQP-VK.image.swapchain* Components: Vulkan, WSI, Linux platform VK-GL-CTS issue: 2422 Change-Id: I7538be79e528ed9cde38cff3404b5f3603bdf5c1 --- framework/platform/lnx/tcuLnxVulkanPlatform.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/framework/platform/lnx/tcuLnxVulkanPlatform.cpp b/framework/platform/lnx/tcuLnxVulkanPlatform.cpp index b933dad..6f0e554 100644 --- a/framework/platform/lnx/tcuLnxVulkanPlatform.cpp +++ b/framework/platform/lnx/tcuLnxVulkanPlatform.cpp @@ -209,6 +209,11 @@ VulkanPlatform::VulkanPlatform (EventState& eventState) vk::wsi::Display* VulkanPlatform::createWsiDisplay (vk::wsi::Type wsiType) const { + if (!hasDisplay(wsiType)) + { + throw NotSupportedError("This display type is not available: ", NULL, __FILE__, __LINE__); + } + switch(wsiType) { #if defined (DEQP_SUPPORT_X11) -- 2.7.4