Fix flakiness in mailbox.display_timing
authorIan Elliott <ianelliott@google.com>
Wed, 16 Aug 2017 21:11:57 +0000 (15:11 -0600)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 25 Aug 2017 10:46:11 +0000 (06:46 -0400)
The "vktWsiDisplayTimingTests.cpp" file was originally written just for
a present mode of VK_PRESENT_MODE_FIFO_KHR.  It has a case at image 80,
where it changes the desiredPresentTime to be 1 second earlier, and then
checks that later.  Such a check doesn't work with
VK_PRESENT_MODE_MAILBOX_KHR, which can throw off the timing of images
(because some images may not be presented).  This has resulted in the
test having random failures.  The "image 80 test" wasn't intended to
occur with MAILBOX, and so it's now being removed.

VK-GL-CTS issue: 622
Components: Vulkan
Affects: dEQP-VK.wsi.*.display_timing.mailbox.display_timing

Change-Id: I9fbd2254b4e6fc1c7bff077c8c0a5229a6d74800

external/vulkancts/modules/vulkan/wsi/vktWsiDisplayTimingTests.cpp

index 3b2a793..540e511 100644 (file)
@@ -1247,7 +1247,7 @@ void DisplayTimingTestInstance::render (void)
                else
                {
                        desiredPresentTime = m_prevDesiredPresentTime + m_targetIPD;
-                       if (presentTime.presentID == 80)
+                       if ((presentTime.presentID == 80) && (m_swapchainConfig.presentMode != vk::VK_PRESENT_MODE_MAILBOX_KHR))
                        {
                                // Test if desiredPresentTime is 1 second earlier (i.e. before the previous image could have been presented)
                                presentTime.desiredPresentTime -= SECOND;