From: Tony Zlatinski Date: Tue, 16 Jun 2020 13:04:08 +0000 (-0500) Subject: Linux WSI checks the WS availability on create X-Git-Tag: upstream/1.3.5~1255^2~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5e372abdf23e14ca68715da7142026fee8ceb533;p=platform%2Fupstream%2FVK-GL-CTS.git 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 --- 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)