tests: Add WIP test case for #1780
diff --git a/tests/layer_validation_tests.cpp b/tests/layer_validation_tests.cpp
index f6ed159..1456466 100644
--- a/tests/layer_validation_tests.cpp
+++ b/tests/layer_validation_tests.cpp
@@ -7543,6 +7543,36 @@
vkFreeCommandBuffers(m_device->device(), m_commandPool->handle(), 1, &draw_cmd);
}
+TEST_F(VkLayerTest, SecondaryCommandBufferRerecorded) {
+ ASSERT_NO_FATAL_FAILURE(Init());
+
+ m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Dummy");
+
+ // A pool we can reset in.
+ VkCommandPoolObj pool(m_device, m_device->graphics_queue_node_index_,
+ VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT);
+ VkCommandBufferObj secondary(m_device, &pool,
+ VK_COMMAND_BUFFER_LEVEL_SECONDARY);
+
+ secondary.begin();
+ secondary.end();
+
+ m_commandBuffer->begin();
+ vkCmdExecuteCommands(m_commandBuffer->handle(), 1, &secondary.handle());
+
+ // rerecording of secondary
+ secondary.reset(); // masks our ability to catch this!
+ secondary.begin();
+ secondary.end();
+
+ vkCmdExecuteCommands(m_commandBuffer->handle(), 1, &secondary.handle());
+ m_commandBuffer->end();
+
+ // submit
+ m_commandBuffer->QueueCommandBuffer(false);
+ m_errorMonitor->VerifyFound();
+}
+
TEST_F(VkLayerTest, CommandBufferResetErrors) {
// Cause error due to Begin while recording CB
// Then cause 2 errors for attempting to reset CB w/o having