| 23 | class NegativeObjectLifetime : public VkLayerTest {}; |
| 24 | |
| 25 | TEST_F(NegativeObjectLifetime, CmdBufferBufferDestroyed) { |
| 26 | TEST_DESCRIPTION("Attempt to draw with a command buffer that is invalid due to a buffer dependency being destroyed."); |
| 27 | RETURN_IF_SKIP(Init()); |
| 28 | |
| 29 | vkt::Buffer buffer(*m_device, 256, VK_BUFFER_USAGE_TRANSFER_DST_BIT); |
| 30 | |
| 31 | m_command_buffer.Begin(); |
| 32 | vk::CmdFillBuffer(m_command_buffer, buffer, 0, VK_WHOLE_SIZE, 0); |
| 33 | m_command_buffer.End(); |
| 34 | |
| 35 | m_errorMonitor->SetDesiredError("VUID-vkQueueSubmit-pCommandBuffers-00070"); |
| 36 | // Destroy buffer dependency prior to submit to cause ERROR |
| 37 | buffer.Destroy(); |
| 38 | |
| 39 | m_default_queue->Submit(m_command_buffer); |
| 40 | m_errorMonitor->VerifyFound(); |
| 41 | m_default_queue->Wait(); |
| 42 | } |
| 43 | |
| 44 | TEST_F(NegativeObjectLifetime, CmdBarrierBufferDestroyed) { |
| 45 | RETURN_IF_SKIP(Init()); |
nothing calls this directly
no test coverage detected