From 5cceb78082833556789a64f3237b04df7a826d93 Mon Sep 17 00:00:00 2001 From: ziga-lunarg Date: Tue, 24 Dec 2024 23:54:24 +0200 Subject: [PATCH] tests: Enable WaitEventThenSet test --- tests/unit/sync_object.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/tests/unit/sync_object.cpp b/tests/unit/sync_object.cpp index d9dbf64da60..00f63fd795c 100644 --- a/tests/unit/sync_object.cpp +++ b/tests/unit/sync_object.cpp @@ -3821,7 +3821,9 @@ TEST_F(NegativeSyncObject, ResetEventThenSet) { m_default_queue->Wait(); } -// TODO: https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/8748 +// This test should only be used for manual inspection +// Because a command buffer with vkCmdWaitEvents is submitted with an +// event that is never signaled, the test results in a VK_ERROR_DEVICE_LOST TEST_F(NegativeSyncObject, DISABLED_WaitEventThenSet) { #if defined(VVL_ENABLE_TSAN) // NOTE: This test in particular has failed sporadically on CI when TSAN is enabled. @@ -3829,7 +3831,18 @@ TEST_F(NegativeSyncObject, DISABLED_WaitEventThenSet) { #endif TEST_DESCRIPTION("Wait on a event then set it after the wait has been submitted."); - RETURN_IF_SKIP(Init()); + SetTargetApiVersion(VK_API_VERSION_1_1); + RETURN_IF_SKIP(InitFramework()); + void *pNext = nullptr; + VkPhysicalDevicePortabilitySubsetFeaturesKHR portability_subset_features = vku::InitStructHelper(); + if (IsExtensionsEnabled(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME)) { + pNext = &portability_subset_features; + GetPhysicalDeviceFeatures2(portability_subset_features); + if (!portability_subset_features.events) { + GTEST_SKIP() << "VkPhysicalDevicePortabilitySubsetFeaturesKHR::events not supported"; + } + } + RETURN_IF_SKIP(InitState(nullptr, pNext)); vkt::Event event(*m_device); @@ -3843,7 +3856,6 @@ TEST_F(NegativeSyncObject, DISABLED_WaitEventThenSet) { m_errorMonitor->SetDesiredError("VUID-vkSetEvent-event-09543"); vk::SetEvent(device(), event.handle()); m_errorMonitor->VerifyFound(); - m_default_queue->Wait(); } TEST_F(NegativeSyncObject, RenderPassPipelineBarrierGraphicsStage) {