Revert "tests: Move device creation from Setup to InitState"
This reverts commit 010c49d26071d5619ddd8cd43f5c8026bee1a7f2.
diff --git a/tests/layer_validation_tests.cpp b/tests/layer_validation_tests.cpp
index 5537bb8..f2f3abc 100644
--- a/tests/layer_validation_tests.cpp
+++ b/tests/layer_validation_tests.cpp
@@ -3430,7 +3430,6 @@
m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT,
"FreeCommandBuffers is attempting to free Command Buffer");
- ASSERT_NO_FATAL_FAILURE(InitState());
VkCommandPool command_pool_one;
VkCommandPool command_pool_two;
@@ -3856,7 +3855,6 @@
"attempt to submit them on a queue created in a different "
"queue family.");
- ASSERT_NO_FATAL_FAILURE(InitState());
// This test is meaningless unless we have multiple queue families
auto queue_family_properties = m_device->phy().queue_properties();
if (queue_family_properties.size() < 2) {
@@ -4421,7 +4419,6 @@
TEST_F(VkLayerTest, RenderPassDepthStencilAttachmentUnused) {
TEST_DESCRIPTION("Specify no depth attachement in renderpass then specify "
"depth attachments in subpass");
- ASSERT_NO_FATAL_FAILURE(InitState());
m_errorMonitor->SetDesiredFailureMsg(
VK_DEBUG_REPORT_ERROR_BIT_EXT,
@@ -5142,7 +5139,6 @@
"Wait on a event then set it after the wait has been submitted.");
m_errorMonitor->ExpectSuccess();
- ASSERT_NO_FATAL_FAILURE(InitState());
VkEvent event;
VkEventCreateInfo event_create_info{};
@@ -5207,7 +5203,6 @@
TEST_DESCRIPTION(
"Issue a query on a secondary command buffery and copy it on a primary.");
- ASSERT_NO_FATAL_FAILURE(InitState());
if ((m_device->queue_props.empty()) ||
(m_device->queue_props[0].queueCount < 2))
return;
@@ -5339,7 +5334,6 @@
TEST_DESCRIPTION(
"Issue a query and copy from it on a second command buffer.");
- ASSERT_NO_FATAL_FAILURE(InitState());
if ((m_device->queue_props.empty()) ||
(m_device->queue_props[0].queueCount < 2))
return;
@@ -5454,7 +5448,6 @@
m_errorMonitor->ExpectSuccess();
- ASSERT_NO_FATAL_FAILURE(InitState());
VkEvent event;
VkEventCreateInfo event_create_info{};
event_create_info.sType = VK_STRUCTURE_TYPE_EVENT_CREATE_INFO;
@@ -5505,9 +5498,10 @@
vkQueueSubmit(queue, 1, &submit_info, VK_NULL_HANDLE);
}
{
- m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT,
- "that is already in use by a "
- "command buffer.");
+ m_errorMonitor->SetDesiredFailureMsg(
+ VK_DEBUG_REPORT_ERROR_BIT_EXT, "Cannot call vkSetEvent() on event "
+ "0x1 that is already in use by a "
+ "command buffer.");
vkSetEvent(m_device->device(), event);
m_errorMonitor->VerifyFound();
}
@@ -5602,7 +5596,6 @@
TEST_DESCRIPTION("Two command buffers, each in a separate QueueSubmit call "
"submitted on separate queues followed by a QueueWaitIdle.");
- ASSERT_NO_FATAL_FAILURE(InitState());
if ((m_device->queue_props.empty()) ||
(m_device->queue_props[0].queueCount < 2))
return;
@@ -5710,7 +5703,6 @@
"submitted on separate queues, the second having a fence"
"followed by a QueueWaitIdle.");
- ASSERT_NO_FATAL_FAILURE(InitState());
if ((m_device->queue_props.empty()) ||
(m_device->queue_props[0].queueCount < 2))
return;
@@ -5826,7 +5818,6 @@
"submitted on separate queues, the second having a fence"
"followed by two consecutive WaitForFences calls on the same fence.");
- ASSERT_NO_FATAL_FAILURE(InitState());
if ((m_device->queue_props.empty()) ||
(m_device->queue_props[0].queueCount < 2))
return;
@@ -5935,8 +5926,6 @@
}
TEST_F(VkLayerTest, TwoQueuesEnsureCorrectRetirementWithWorkStolen) {
-
- ASSERT_NO_FATAL_FAILURE(InitState());
if ((m_device->queue_props.empty()) ||
(m_device->queue_props[0].queueCount < 2)) {
printf("Test requires two queues, skipping\n");
@@ -6023,14 +6012,12 @@
"submitted on separate queues, the second having a fence, "
"followed by a WaitForFences call.");
- ASSERT_NO_FATAL_FAILURE(InitState());
if ((m_device->queue_props.empty()) ||
(m_device->queue_props[0].queueCount < 2))
return;
m_errorMonitor->ExpectSuccess();
- ASSERT_NO_FATAL_FAILURE(InitState());
VkFence fence;
VkFenceCreateInfo fence_create_info{};
fence_create_info.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO;
@@ -6142,7 +6129,6 @@
m_errorMonitor->ExpectSuccess();
- ASSERT_NO_FATAL_FAILURE(InitState());
VkFence fence;
VkFenceCreateInfo fence_create_info{};
fence_create_info.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO;
@@ -6249,7 +6235,6 @@
m_errorMonitor->ExpectSuccess();
- ASSERT_NO_FATAL_FAILURE(InitState());
VkFence fence;
VkFenceCreateInfo fence_create_info{};
fence_create_info.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO;
@@ -6352,7 +6337,6 @@
m_errorMonitor->ExpectSuccess();
- ASSERT_NO_FATAL_FAILURE(InitState());
VkFence fence;
VkFenceCreateInfo fence_create_info{};
fence_create_info.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO;
@@ -6448,7 +6432,6 @@
TEST_DESCRIPTION(
"Two command buffers each in a separate SubmitInfo sent in a single "
"QueueSubmit call followed by a WaitForFences call.");
- ASSERT_NO_FATAL_FAILURE(InitState());
m_errorMonitor->ExpectSuccess();
@@ -6558,7 +6541,6 @@
"Run a simple draw calls to validate failure when Depth Bias dynamic "
"state is required but not correctly bound.");
- ASSERT_NO_FATAL_FAILURE(InitState());
// Dynamic depth bias
m_errorMonitor->SetDesiredFailureMsg(
VK_DEBUG_REPORT_ERROR_BIT_EXT,
@@ -6573,7 +6555,6 @@
"Run a simple draw calls to validate failure when Line Width dynamic "
"state is required but not correctly bound.");
- ASSERT_NO_FATAL_FAILURE(InitState());
// Dynamic line width
m_errorMonitor->SetDesiredFailureMsg(
VK_DEBUG_REPORT_ERROR_BIT_EXT,
@@ -6588,7 +6569,6 @@
"Run a simple draw calls to validate failure when Viewport dynamic "
"state is required but not correctly bound.");
- ASSERT_NO_FATAL_FAILURE(InitState());
// Dynamic viewport state
m_errorMonitor->SetDesiredFailureMsg(
VK_DEBUG_REPORT_ERROR_BIT_EXT,
@@ -6603,7 +6583,6 @@
"Run a simple draw calls to validate failure when Scissor dynamic "
"state is required but not correctly bound.");
- ASSERT_NO_FATAL_FAILURE(InitState());
// Dynamic scissor state
m_errorMonitor->SetDesiredFailureMsg(
VK_DEBUG_REPORT_ERROR_BIT_EXT,
@@ -6617,8 +6596,6 @@
TEST_DESCRIPTION(
"Run a simple draw calls to validate failure when Blend Constants "
"dynamic state is required but not correctly bound.");
-
- ASSERT_NO_FATAL_FAILURE(InitState());
// Dynamic blend constant state
m_errorMonitor->SetDesiredFailureMsg(
VK_DEBUG_REPORT_ERROR_BIT_EXT,
@@ -6632,8 +6609,6 @@
TEST_DESCRIPTION(
"Run a simple draw calls to validate failure when Depth Bounds dynamic "
"state is required but not correctly bound.");
-
- ASSERT_NO_FATAL_FAILURE(InitState());
if (!m_device->phy().features().depthBounds) {
printf("Device does not support depthBounds test; skipped.\n");
return;
@@ -6651,8 +6626,6 @@
TEST_DESCRIPTION(
"Run a simple draw calls to validate failure when Stencil Read dynamic "
"state is required but not correctly bound.");
-
- ASSERT_NO_FATAL_FAILURE(InitState());
// Dynamic stencil read mask
m_errorMonitor->SetDesiredFailureMsg(
VK_DEBUG_REPORT_ERROR_BIT_EXT,
@@ -6666,8 +6639,6 @@
TEST_DESCRIPTION(
"Run a simple draw calls to validate failure when Stencil Write dynamic"
" state is required but not correctly bound.");
-
- ASSERT_NO_FATAL_FAILURE(InitState());
// Dynamic stencil write mask
m_errorMonitor->SetDesiredFailureMsg(
VK_DEBUG_REPORT_ERROR_BIT_EXT,
@@ -6681,8 +6652,6 @@
TEST_DESCRIPTION(
"Run a simple draw calls to validate failure when Stencil Ref dynamic "
"state is required but not correctly bound.");
-
- ASSERT_NO_FATAL_FAILURE(InitState());
// Dynamic stencil reference
m_errorMonitor->SetDesiredFailureMsg(
VK_DEBUG_REPORT_ERROR_BIT_EXT,
@@ -6694,8 +6663,6 @@
TEST_F(VkLayerTest, IndexBufferNotBound) {
TEST_DESCRIPTION("Run an indexed draw call without an index buffer bound.");
-
- ASSERT_NO_FATAL_FAILURE(InitState());
m_errorMonitor->SetDesiredFailureMsg(
VK_DEBUG_REPORT_ERROR_BIT_EXT,
"Index buffer object not bound to this command buffer when Indexed ");
@@ -6876,8 +6843,6 @@
TEST_F(VkLayerTest, InvalidDescriptorPool) {
// Attempt to clear Descriptor Pool with bad object.
// ObjectTracker should catch this.
-
- ASSERT_NO_FATAL_FAILURE(InitState());
m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT,
"Invalid Descriptor Pool Object 0xbaad6001");
uint64_t fake_pool_handle = 0xbaad6001;
@@ -6941,7 +6906,7 @@
VkDescriptorSetLayout bad_layout = reinterpret_cast<VkDescriptorSetLayout &>(fake_layout_handle);
m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT,
"Invalid Descriptor Set Layout Object 0xbaad6001");
- ASSERT_NO_FATAL_FAILURE(InitState());
+
VkPipelineLayout pipeline_layout;
VkPipelineLayoutCreateInfo plci = {};
plci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO;
@@ -12326,7 +12291,6 @@
TEST_F(VkLayerTest, MismatchCountQueueCreateRequestedFeature) {
TEST_DESCRIPTION("Use an invalid count in a vkEnumeratePhysicalDevices call."
"Use invalid Queue Family Index in vkCreateDevice");
- ASSERT_NO_FATAL_FAILURE(InitState());
const char *mismatch_count_message =
"Call to vkEnumeratePhysicalDevices() "
@@ -15860,7 +15824,6 @@
TEST_DESCRIPTION("Exceed the limits of image format ");
- ASSERT_NO_FATAL_FAILURE(InitState());
m_errorMonitor->SetDesiredFailureMsg(
VK_DEBUG_REPORT_ERROR_BIT_EXT,
"CreateImage extents exceed allowable limits for format");