layers: Cleanup core_validation fence tracking
There were two separate mechanisms for tracking fence state in core_validation.
This change removes the last[Retired|Submitted]Id per queue method.
We also no longer over-write the fence createInfo to track fence state, but
just use the needsSignaled bool for all fence state tracking.
Finally, there was a validation test/check flagging an error if an
unsignaled fence was reset, but this is valid based on the spec so removed
the check and changed test to be a positive test expected to pass.
diff --git a/tests/layer_validation_tests.cpp b/tests/layer_validation_tests.cpp
index 971b924..395912c 100644
--- a/tests/layer_validation_tests.cpp
+++ b/tests/layer_validation_tests.cpp
@@ -797,23 +797,22 @@
m_errorMonitor->VerifyFound();
}
-
+// This is a positive test. We used to expect error in this case but spec now
+// allows it
TEST_F(VkLayerTest, ResetUnsignaledFence) {
+ m_errorMonitor->ExpectSuccess();
vk_testing::Fence testFence;
VkFenceCreateInfo fenceInfo = {};
fenceInfo.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO;
fenceInfo.pNext = NULL;
- m_errorMonitor->SetDesiredFailureMsg(
- VK_DEBUG_REPORT_WARNING_BIT_EXT,
- "submitted to VkResetFences in UNSIGNALED STATE");
-
ASSERT_NO_FATAL_FAILURE(InitState());
testFence.init(*m_device, fenceInfo);
VkFence fences[1] = {testFence.handle()};
- vkResetFences(m_device->device(), 1, fences);
+ VkResult result = vkResetFences(m_device->device(), 1, fences);
+ ASSERT_VK_SUCCESS(result);
- m_errorMonitor->VerifyFound();
+ m_errorMonitor->VerifyNotFound();
}
/* TODO: Update for changes due to bug-14075 tiling across render passes */